reactjs - 无法创建 react ,中止安装 yarnpkg add --exact react react-dom react-scripts cra-template has failed

标签 reactjs npm yarnpkg

我在创建 npx create-react-app 时遇到了麻烦。
➤ YN0009: │ core-js@npm:2.6.11 无法成功构建(退出代码1,日志可以在这里找到:/C:/Users/acer/AppData/Local/Temp/logfile-10088VPjTiMAhqTi1.log)
➤ YN0009: │ fsevents@patch:fsevents@npm%3A1.2.12#builtin::version=1.2.12&hash=77dfe6 无法成功构建(退出代码1,日志可以在这里找到:/C :/Users/acer/AppData/Local/Temp/logfile-10088GGXEekcVAsh7.log)
➤ YN0009: │ core-js-pure@npm:3.6.4 无法成功构建(退出代码1,日志可以在这里找到:/C:/Users/acer/AppData/Local/Temp/logfile-10088HJnNDOaZdPmT。日志)
➤ YN0009: │ core-js@npm:3.6.4 无法成功构建(退出代码1,日志可以在这里找到:/C:/Users/acer/AppData/Local/Temp/logfile-10088nbZGburV304n.log)
➤ YN0000:└ 17.86s完成
➤ YN0000:在 49.26 秒内因错误而失败
正在中止安装。
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Users\acer\Desktop\coding tutorial\raraa_react 失败了。
正在删除生成的文件... package.json
正在删除生成的文件...yarn.lock
完毕。
我还使用了 yarn cache clean 和 npm cache clean --force。
但没有什么是工作。请帮助我。

最佳答案

这对我有用:

npm install -g npm@latest
npm install node
npm install -g yarn
yarn cache clean
npx create-react-app my-app

关于reactjs - 无法创建 react ,中止安装 yarnpkg add --exact react react-dom react-scripts cra-template has failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64330949/

相关文章:

reactjs - npm run build 无论如何都挂起,无法升级 webpack

javascript - 如何获得 jupyterlab 的 javascript 依赖项的最终列表

javascript - React 大日历没有默认导出

javascript - 为什么我的状态没有在 useEffect 中更新?

javascript - npm 错误!不支持的 URL 类型 "workspace:": workspace:*

angular - ng-serve 失败,yarn 作为包管理器

javascript - yarn 无法使用 node 12.1.0 构建 node-sass

reactjs - React 中的延迟加载和列表虚拟化有什么区别?

javascript - 如何在 react 中设置标签的背景颜色?

javascript - 在没有模块加载器的情况下在 TypeScript 中使用 ES2015 模块