【发布时间】:2020-09-17 07:45:53
【问题描述】:
here is the img description of the error
首先它会创建文件夹(my-app),但几秒钟后它会被自动删除。要么我安装了最新版本的 node.js。
$ npx create-react-app my-app npx : 98 installé(s) en 23.154s
在 D:\Mon-Travail-Personnel\my-work-with-REACT\my-app 中创建一个新的 React 应用程序。
安装包。这可能需要几分钟。 使用 cra-template 安装 react、react-dom 和 react-scripts...
直到知道它很好但之后: ** npm 错误!在 '...rg\r\n\r\nwsFcBAEBCAA' 附近解析时 JSON 输入意外结束
npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! C:\Users\khith\AppData\Roaming\npm-cache_logs\2020-05-29T16_51_36_753Z-debug.log
中止安装。 npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
正在删除生成的文件... package.json 从 D:\Mon-Travail-Personnel\my-work-with-REACT 中删除 my-app/ 完毕。 **
【问题讨论】:
-
查看StackOverflow question。它可能会解决您的问题