【问题标题】:Rails npm run watching npm ERR! Missing script: "watching"Rails npm run 看 npm ERR!缺少脚本:“观看”
【发布时间】:2022-01-20 02:05:55
【问题描述】:

我下载了(git clone)2个git repo,其中一个是React项目,我成功执行了命令npm run start-reactapp ,这样就可以在localhost:3000浏览网站了。

我还需要启动另一个Rails项目,否则后端功能(例如会员登录)将无效。但是我执行npm run watching 的时候出现了如下错误,导致我无法继续下一个rails服务器。

npm ERR! Missing script: "watching"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/keaton/.npm/_logs/2021-12-17T03_20_47_673Z-debug.log

我该如何解决这个问题?

【问题讨论】:

    标签: node.js reactjs ruby-on-rails git npm


    【解决方案1】:

    npm run watching 表示“在scripts.watching 中运行package.json 中的命令”。错误消息意味着您在package.json 中定义的"scripts" 对象内没有键"watching"。因此,无论您从哪里获得运行 npm run watching 的说明,您都需要找到应该在您的 package.json 中的条目并添加它。

    有关npm run 工作原理的更多信息,请参阅npm-run-script docs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 2023-03-05
      • 2019-11-07
      相关资源
      最近更新 更多