I got the following error in node version 8+ - node.js

Previous node version is 7.9.0. The project was running well.
When I upgraded it to 8.9.4, I got the following errors.
ERROR in ./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/sass/styles.scss
Module build failed: Error: Missing binding F:\LogicSoft-SRL\angular-frontdesk\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 7.x
How can I fix this error in the current version(8.9.4)?

From the error message, it looks like you have to rebuild node-sass for your node version. You can do this by running the command from this answer.
npm rebuild node-sass
You can find more info on the rebuild command here.

Related

error in npm start vs code , react project

H!
i tryin to run my React Project using npm start command in terminal :
npm v7.4.3
node v15.7.0
error in terminal
./src/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/index.scss)
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
and face this error in localhost:8888
Failed to compile
./src/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/index.scss)
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
i trying tso solve problem with this commands
npm rebuild node-sass
and other way was reinstall node-sass
im trying to delete node_modules and run npm install
but seem doesnt work for me.
any answers ?
Downgrade node.js to a stable version (LTS) like 14.15.4
Install the compatible node-sass version via npm install node-sass#5.0.0; you can find the list here or use the GitHub releases page, or even install gulp-sass with npm i gulp-sass`.

Angular - Is node-sass supported in the node version 11?

I have this new error which is failing the compilation of the code.
Is it the problem with the node version?
Is node-sass supported in all node versions?
If not how to fix this?
Module build failed: Error: Cannot find module 'node-sass'
Try running npm rebuild node-sass and see if it fixes your problem (you may have to run with --force)
You should run this every time you change your environment (ie: node version).

Laravel with Node.js: "Node Sass could not find a binding for your current environment"

So I did not have installed Node before, just standard Laravel. Today I installed Node.js 8 and now one of my older projects tells me the following in the console:
app.js:66591 Uncaught Error: Module build failed: ModuleBuildError: Module build failed: Error: Missing binding /node_modules/node-sass/vendor/darwin-x64-57/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
Unfortunately, 'npm rebuild node-sass --force' doesn't change anything. I tried to install either Node 6 or 8, but I cannot get rid of the error (site is still working anyway, is Laravel using Node only for npm?).
So what's the solution for this?

Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

I get following error message when running gulp:
Error: Missing binding Z:\Themewagon\Premium\sparrow\zcore\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x
Found bindings for the following Environments: Linux 64-bit with Node.js 7.x
To resolve this error I tried:
npm install node-sass,
npm rebuild node-sass,
npm uninstall -save node-sass,
npm install -save node-sass,
npm cache clean. etc
Nothing is working for me. How do I resolve this issue.
This happens when you have 2 versions of Node installed, add node-sass with one and run it for the other.
Example Visual Studio ships with Node 5 (at least VS2017 does). If you have installed another version of node (say v6) and install node-sass using that. When it installs it binds to the version to version 6. You can then never run gulp via Visual studio (under Node 5) it fails with the error.
To fix this you can make visual studio use the version you have installed on your system. Add the entry to top of the list to your node location:

Webpack Binding Issue

Hey guys for some reason I keep getting this error when building with sass-loader
Module build failed: Error: Missing binding C:\TFS_Local\DPOnGit\node_modules\node-sass\vendor\win32-ia32-11\binding.node
Node Sass could not find a binding for your current environment: Windows 32-bit with Node 0.10.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 5.x
This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to build the binding for your current environment.
Very frustrating as this config has worked on the same machine before without issues.
I had the same problem, rebuilding as suggested by the error message didn't work for me, but running
npm install --save sass-loader
did.

Resources