reactjs - 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。我以同样的方式运行代码,但一切都很好。解决方案是什么?
解决方案
尝试删除 node_modules 和 package.log 或 yarn.lock 文件。并npm install
再次运行。应该能解决你的问题。
推荐阅读
- c# - MOQ - 为 SqlDatabase 设置模拟接口 IDatabase
- spring-boot - 在配置spring boot中定义一个bean名称
- mysql - 如何根据office 365 excel字段动态更新在Mysql中插入记录?
- selenium - .gitlab-ci.yml 管道中的 Plotly-Dash 测试失败并出现 NameError:未定义名称“DashComposite”
- flutter - 如何使用逻辑在飞镖上标记每个日期?
- bash - 从 bash 命令开始的交互式 ssh 会话
- reactjs - 如何在反应语法hightligting中添加文件名或标题
- matlab - 如何在matlab的网格上使用while循环?
- c# - C# 中的客户端套接字
- css - 触摸输入字段在 iOS Safari 上停止滚动