Node.js 为什么我在尝试安装react应用程序时不断收到错误
这是我第一次尝试React,一次又一次地看到同样的错误让我很沮丧。我分别尝试了这三种代码Node.js 为什么我在尝试安装react应用程序时不断收到错误,node.js,reactjs,npm,create-react-app,npx,Node.js,Reactjs,Npm,Create React App,Npx,这是我第一次尝试React,一次又一次地看到同样的错误让我很沮丧。我分别尝试了这三种代码 npx创建反应应用程序myapp npm init react app myapp npm安装-g创建react app然后create react app myapp 这一切给了我: npm ERR! Unexpected end of JSON input while parsing near '...:"^5.0.0 || ^6.0.0"},' npm ERR! A complete log of
npx创建反应应用程序myapp
npm init react app myapp
npm安装-g创建react app
然后create react app myapp
这一切给了我:
npm ERR! Unexpected end of JSON input while parsing near '...:"^5.0.0 || ^6.0.0"},'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\{hiddenForPrivacyReasons}\AppData\Roaming\npm-cache\_logs\2020-04-18T14_12_44_513Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting my-app/ from D:\{hiddenForPrivacyReasons}\codes\app
Done.
救命啊 您不需要
react app
和其他脚本
简单地说:
npx create-react-app my-app
cd my-app
npm start
参考:文件的您尝试过这个吗?