npm ERR! Failed at the node-sass@4.14.1 postinstall script.
我们后台要了前端源代码,启动Vue项目后出现了这几行出错信息
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.14.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
于是,我就找了度娘,解决方案是在当前目录下对node-sass进行数据源设置
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
执行这个命令之前,千万别删安装的依赖包「node_modules」那个文件,直接执行上面那行代码就可;
我们可爱的后台先把安装的node_modules删除了,然后执行的那行代码......后台谨记!!前端绝对不会出这个问题的,哈哈哈哈哈
~

浙公网安备 33010602011771号