欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

vue安装scss出现的问题记录+解决

程序员文章站 2022-07-02 14:11:35
1:如果一直安装下去我的出现的错误:Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefinedat validateString (internal/validators.js:117:11)at Object.join (path.js:375:7)at getSassOptions (E:\MyVue\MyVue\no...

1:如果一直安装下去
vue安装scss出现的问题记录+解决
vue安装scss出现的问题记录+解决
我的出现的错误:Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
at validateString (internal/validators.js:117:11)
at Object.join (path.js:375:7)
at getSassOptions (E:\MyVue\MyVue\node_modules_sass-loader@10.0.4@sass-loader\dist\utils.js:160:37)
at Object.loader (E:\MyVue\MyVue\node_modules_sass-loader@10.0.4@sass-loader\dist\index.js:36:49)

@ ./node_modules/vue-style-loader!./node_modules/css-loader?{“sourceMap”:true}!./node_modules/vue-loader/lib/style-compiler?{“vue”:true,“id”:“data-v-7ba5bd90”,“scoped”:false,“hasInlineConfig”:false}!./node_modules/_sass-loader@10.0.4@sass-loader/dist/cjs.js?{“sourceMap”:true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-377 13:3-17:5 14:22-38
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
·解决方案:
vue安装scss时报The “path“ argument must be of type string. Received undefined
我感觉是因为版本最新的问题,需要降低版本,
这个时候我们需要两部操作就好了哦
第一步:1:package.json里面找到sass-loader”:"^10.0.1",修改版本为 “sass-loader”: “^7.3.1”
第二步:2:重新使用命令安装npm i sass-loader@7 --D
没有第三步会报Error: Cannot find module ‘node-sass’,这个时候我们再次安装就可
第三步:3:cnpm install node-sass@latest
嗯!成功了哈~~~
······························与君共勉

本文地址:https://blog.csdn.net/weixin_44458630/article/details/109237636

相关标签: vue