Nuxt.js: Sass files not found

Created on 3 Aug 2017  路  3Comments  路  Source: nuxt/nuxt.js

When using the CSS property in nuxt.conf.js as explained here, trying to load a *.scss or *.sass file, following error shows in the console:

This relative module was not found:

../assets/main.scss in ./node_modules/babel-loader/lib?{"presets":["vue-app"],"babelrc":false,"cacheDirectory":true}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./.nuxt/App.vue

CSS files work as expected.

nuxt.conf.js:

module.exports = { 
  ...
  css: [{
    src: '~assets/main.scss', lang: 'scss'
  }],
  ...
};

Created through vue init nuxt/starter with Nuxt version 1.0.0-rc3.

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

Most helpful comment

Did you install node-sass and sass-loader?

All 3 comments

Did you install node-sass and sass-loader?

Thank you very much, that solved it :) They need to be locally (not -g) installed.

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

vadimsg picture vadimsg  路  3Comments

uptownhr picture uptownhr  路  3Comments

danieloprado picture danieloprado  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

surmon-china picture surmon-china  路  3Comments