【发布时间】:2018-08-26 11:05:08
【问题描述】:
我在 Windows 10 上通过命令行创建 React 应用程序时遇到了奇怪的情况。运行 create-react-app 命令时出现以下错误。我正在使用节点 v8.9.4 和 npm v6.4.0。
Creating a new React app in D:\react\myreactapp.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Unexpected end of JSON input while parsing near '...^1.0.1","line-numbers'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache\_logs\2018-08-26T11_04_03_908Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting myreactapp / from D:\react
Done.
【问题讨论】:
-
运行
react-native info并使用结果编辑问题。