ERROR in Cannot find module 'node-sass'解决方案

15046694-c4c61ef7ab8f694f.jpg
vue.jpg
 error  in ./src/views/layout/components/TagsView.vue?vue&type=style&index=1&lang=scss&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)

从淘宝镜像那下载安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

最后输入

cnpm install node-sass --save
npm run dev

发现问题已经解决

本次分享就到这里,喜欢的小伙伴欢迎关注支持,后续会带来更多精彩

你可能感兴趣的:(ERROR in Cannot find module 'node-sass'解决方案)