Nuxt.js: This dependency was not found: vue-style-loader, css-loader

Created on 11 Jul 2017  路  4Comments  路  Source: nuxt/nuxt.js

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:

  • !!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 in ./.nuxt/App.vue

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

This question is available on Nuxt.js community (#c935)

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

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maicong picture maicong  路  3Comments

surmon-china picture surmon-china  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

lazycrazy picture lazycrazy  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments