【发布时间】:2019-05-07 08:32:18
【问题描述】:
我目前正在学习 React。我已经完成了:
-
npm i -g create-react-app(成功) -
create-react-app react-app(成功) cd react-app-
npm start(以上错误)
输出:
npm start \Git\cmd 出乎意料。此时。
npm 错误!代码 ELIFECYCLE
所以,我通过在线搜索尝试了什么:
npm cache clean --force- 删除节点模块
- 删除 package-lock.json
npm run clear- npm 安装
没有解决。我已经读过我不应该全局安装但现在它已经安装(?)我可以回滚吗?我无法再次运行 npm i g create-react-app 。 谢谢
【问题讨论】:
-
请发布您的 package.json 内容
-
另外,您使用的是什么操作系统?如果您在 Linux 上,可能是权限问题
-
{ "name": "react-app", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.6.3", "react-dom": "^16.6.3", "react-scripts": "2.1.1" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, "browserslist": [ ">0.2%", "not dead", "not ie <= 11", "not op_mini all" ] } -
我使用的是 Windows
-
我添加了截图