【问题标题】:npm start problem: npm ERR! code ELIFECYCLEnpm 启动问题:npm ERR!代码生命周期
【发布时间】:2020-12-23 15:26:29
【问题描述】:

我在使用“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。我以同样的方式运行代码,但一切都很好。解决办法是什么?

【问题讨论】:

    标签: reactjs react-native npm


    【解决方案1】:

    确保您正在编写 npm start 命令来更正您的 package.json 所在的包。 更有可能您似乎没有安装反应脚本。 您可以尝试使用以下命令安装脚本吗?

    npm i react-scripts
    

    这可能会解决您的问题。学习愉快:)

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 2020-09-09
        • 2019-09-13
        • 2017-12-27
        • 2018-09-03
        • 1970-01-01
        • 2021-07-10
        • 2021-09-15
        • 2020-06-25
        • 1970-01-01
        相关资源
        最近更新 更多