Hi, i am trying to global stlyle scss file to nuxt conging file but this is the error that pops up when running npm run dev. It reports that dependencies are not isntalled but instead they are.
This is nuxt conf file:
module.exports = {
head: {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
]
},
css: [
{ src: '~styles/main.scss', lang: 'scss' }
]
}
and the package.json file dev dependencies:
"devDependencies": {
"css-loader": "^0.28.4",
"node-sass": "^4.5.3",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"stylus": "^0.54.5",
"vue-style-loader": "^3.0.1"
}
The error:
ERROR Failed to compile with 1 errors 11:02:00 AM
This dependency was not found:
To install it, you can run: npm install --save !!vue-style-loader!css-loader!../node_modules/nuxt/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-2753b548","scoped":false,"hasInlineConfig":true}!sass-loader!~styles/main.scss
Error in a path of main.scss file, try put your file into assets folder and change distanation on ~assets/main.scss
Thanks, it worked.
Just wanted to note that even lots of Vue issues misdiagnosed this problem/error message. Great, and thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Error in a path of main.scss file, try put your file into assets folder and change distanation on
~assets/main.scss