I
I
Ivan Smirnov2018-04-26 10:40:01
Sass
Ivan Smirnov, 2018-04-26 10:40:01

How to properly include scss in webpack?

There was a need to put Sass in a React project and here's the problem:
when the project starts, it gives an error

Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version.
. With this I have everything installed:
"node-sass": "^4.8.3", "sass-loader": "^7.0.1",
. I wrote the following in the config:
{
test: /\.scss$/,
include: paths.appSrc,
loaders: ['style-loader', 'css-loader', 'sass-loader']
}
. What could be wrong, I do not understand at all. I really hope for you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Smirnov, 2018-04-26
@T_H

Run cmd as admin and globally install this package, which will do everything for you - yarn global add windows-build-tools and that's it

N
Nikolai Shabalin, 2018-04-26
@nikolayshabalin

Check nodejs version.

node -v

или

node --version

must be more than 4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question