By accessing the website and accepting the Cookie Policy, you agree to use the cookies provided by the Site in accordance with to analyze traffic, remember your preferences, and optimize your experience.
debian9安装@vue/cli 3脚手架报错scripts/postinstall的解决方法
2019-04-18 12:17:08    202    0    0
emengweb

第一种方法:


通常情况下,是由于缓存的问题导致的

rm -rf node_modules 删除缓存的模块目录,之后再重新 npm install 就可以了


第二种方法:


安装命令

npm install -g @vue/cli

错误提示

#npm ERR! protobufjs@6.8.8 postinstall: `node scripts/postinstall`

解决方案

使用 ignore-scripts 标签,跳过报错脚本的执行

npm install  @vue/cli -g --ignore-scripts

使用同样的标签在 protobufjs 上

npm install protobufjs  -g --ignore-scripts

最后手动执行 protobufjs postinstall 脚本

node /root/.nvm/versions/node/v11.4.0/lib/node_modules/protobufjs/scripts/postinstall.js

大功告成!@vue/cli 3纵欲安装成功

 

上一篇: bash: vue: command not found

下一篇: Vue-cli 3 中新的用户图形化界面

202 人读过
文档导航