首页 > 解决方案 > npm 启动问题:npm ERR!代码生命周期

问题描述

我在使用“npm start”启动应用程序时遇到了一些问题。创建反应文件文件夹并使用该命令后,我可以看到:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! weatherapp@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the weatherapp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我想补充一点,我以前用过 react。我以同样的方式运行代码,但一切都很好。解决方案是什么?

标签: reactjsreact-nativenpm

解决方案


尝试删除 node_modules 和 package.log 或 yarn.lock 文件。并npm install再次运行。应该能解决你的问题。


推荐阅读