mysticatea / npm-run-all

A CLI tool to run multiple npm-scripts in parallel or sequential.
MIT License
5.72k stars 240 forks source link

安装后不认识命令npm-run-all #238

Open dong-lufei opened 2 years ago

dong-lufei commented 2 years ago

npm-run-all : 无法将“npm-run-all”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。

takegine commented 2 years ago

需要在项目内的命令中使用。 比如你是 npm i --dev npm-run-all, 那么在 package.scripts 就可以写 “dev”: “run-p dev:*” , (correct) 然后就可以执行 npm run dev

(wrong) 而不能直接在终端执行 run-p dev:*


another way 另一种我没有尝试过的办法,需要安装为全局对象。npm i -g npm-run-all