node.js – node-sass is not installed

Question:

Despite all the tweaks, node-sass is not installed. sass-loader for webpack was installed fine (it is in package.json), and the node-sass module is installed (you can see the corresponding folder appears in node-modules, IDE Sublime Text), then an error is issued and the folder disappears.

The mistake is

failed at the node-sass@3.4.2 postinstall
node scripts/build.js

Exit status 3221225477

I tried everything: I created a map in webpack.config.js

{
  test: /\.scss$/,
  loader: 'style!css!sass?sourceMap'
}

Replaced the line in loader.js

if(map && typeof map !== "string") {
    map = JSON.stringify(map);
    }

Nothing works! Or on windows XP, in principle, this module is not installed (although all other modules work fine)?

Answer:

So I found the answer to my question. On XP there is a problem with the msvcrt.dll library entry for Ruby. Although there are similar problems with installing node-sass on OS 10. On older versions, the problem is solved by installing your own development environment. Details here:

https://github.com/oneclick/rubyinstaller/issues/239

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#building-the-devkit

https://github.com/oneclick/rubyinstaller/

Scroll to Top