为什么可以';t npm在同时使用时查找我的命令

为什么可以';t npm在同时使用时查找我的命令,npm,Npm,我想用dev命令调用多个命令。我在这里发现,并发使用是实现这一点的最佳方法,因为它可以在多个操作系统上工作 我也把下面的事记下来了 npm install -g npm-windows-upgrade npm install -g concurrently npm install concurrently 我可以单独运行它们。但是当我使用npm run dev运行脚本时,我得到以下错误。为什么npm找不到这些命令 终端 [0] 'watch-client' is not recogniz

我想用dev命令调用多个命令。我在这里发现,并发使用是实现这一点的最佳方法,因为它可以在多个操作系统上工作

我也把下面的事记下来了

npm install -g npm-windows-upgrade 
npm install -g concurrently
npm install concurrently
我可以单独运行它们。但是当我使用
npm run dev
运行脚本时,我得到以下错误。为什么npm找不到这些命令

终端

 [0] 'watch-client' is not recognized as an internal or external command,
        [0] operable program or batch file.
        [1] 'watch-server' is not recognized as an internal or external command,
        [1] operable program or batch file.
        [0] watch-client exited with code 1
        --> Sending SIGTERM to other processes..
        [1] watch-server exited with code 1
        npm ERR! code ELIFECYCLE
        npm ERR! errno 1
        npm ERR! diepio@1.0.0 dev: `concurrently --kill-others "watch-client" "watch-server"`
        npm ERR! Exit status 1
        npm ERR!
        npm ERR! Failed at the diepio@1.0.0 dev script.
        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

        npm ERR! A complete log of this run can be found in:
        npm ERR!     C:\Users\31614\AppData\Roaming\npm-cache\_logs\2019-12-24T11_09_40_394Z-debug.log
Package.json

 "scripts": {
        "dev": "concurrently --kill-others \"watch-client\" \"watch-server\" \"serve\"",
        "watch-client": "parcel ./src/client/index.html --open --out-dir ./builds/development/public",
        "watch-server": "parcel ./src/server/index.ts --out-dir ./builds/development/private --target node",
        "serve": "nodemon ./builds/development/private"
      }

您可能需要将npm及其子模块添加到系统路径中

您是否已将npm模块下载到项目目录中


您还可以检查是否安装了带有全局参数的npm子模块。

问题是我以错误的方式运行脚本,我不得不这样做
“dev”:“并发--杀死其他人\”npm run watch client \“\”npm run watch server \“npm run serve \”,

我执行了此npm安装-g npm windows升级npm安装-g是否应将其添加到我的路径?我检查了我的环境,发现npm是全局安装的,因此我可以单独运行