赶知识网

sh: vue-cli-service: command not found

2023-12-13 / 185次点击 Js/Css/jQuery Vue npm

报错如下:sh: vue-cli-service: command not found

清除缓冲

npm cache clean --force

重新安装

npm/cnpm install


另网上的文章,大致说了3个解决方法


1、重新安装

将 文件夹node_modules 删除在执行 npm/cnpm install 进行重新安装


2、指定路径

./node_modules/.bin/vue-cli-service build


3、全局安装

npm install @vue/cli-service -g


4、环境变量NODE_ENV=production

多试几次,如果别的原因可以参考 https://stackoverflow.com/questions/51172064/command-not-found-with-vue-cli


作者:我是七月

链接:https://www.jianshu.com/p/3e4915b88076

来源:简书

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


有用 没用

Top10

沪ICP备09053415号 © 赶知识网