在 vue 项目打包时报了
Module build failed: Error: Cannot find module 'node-sass'
这个错误
1.下载 node-sass
依赖
npm install node-sass --save-dev
结果还是报错,错误详情如下:
2.通过淘宝镜像下载即可,然后配置淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
3.最后下载
cnpm install node-sass --save
4.运行 npm run build
。。。终于好了,感动。。。
我的
个人博客
有空来坐坐
https://www.wangyanan.online