admin管理员组文章数量:1136605
Using n
to switch Node versions.
I've ran yarn
, npm rebuild node-sass --force
many many times. And still fails. Getting this error:
Node Sass could not find a binding for your current environment
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.
Anyone have any idea how to fix?
Also.. When running this command..
npm rebuild node-sass --force
I get..
npm WARN using --force I sure hope you know what you are doing.
Doens't seem like it is doing anything..
Using n
to switch Node versions.
I've ran yarn
, npm rebuild node-sass --force
many many times. And still fails. Getting this error:
Node Sass could not find a binding for your current environment
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.
Anyone have any idea how to fix?
Also.. When running this command..
npm rebuild node-sass --force
I get..
npm WARN using --force I sure hope you know what you are doing.
Doens't seem like it is doing anything..
Share Improve this question edited Nov 2, 2018 at 20:22 GN. asked Nov 2, 2018 at 20:16 GN.GN. 9,80913 gold badges70 silver badges141 bronze badges 12 | Show 7 more comments14 Answers
Reset to default 49I did below to resolve the issue.
npm uninstall node-sass
npm i node-sass
npm rebuild node-sass
remove node-sass
from your command and just run npm rebuild --force
If npm rebuild node-sass
and npm rebuild node-sass --force
doesn't work. Just uninstall node-sass and install again.
I have tried all options like:
npm rebuild --force
npm rebuild node-sass --force
npm rebuild node-sass &
also did try to install through Python & updated VS Project links, but nothing worked..
EXCEPT running it manually:
node node_modules/node-sass/scripts/install.js
The main issue is that your node-sass
and node-npm
versions are incompatible.
Please see the chart on this site or on this.
So my suggestion is either adjust your node-npm
version or adjust node-sass
.
In my case I was using node-sass
of version 4.9.4
with node version 8.12.0
and npm version 6.4.1
, It was working fine without any issue, later on I got new system and I had installed the latest node(12.16.0
) & npm(6.13.4
) and issue started so I dug into this and found above links.
Hope this will help you.
I just ran the command npm install node-sass
and my issue was resolved.
remove package-lock.json
file
remove node_modules
folder
then remove from package.json
it devDependencies
"node-sass": "4...",
then
npm i node-sass -D
and
npm i
We are also facing the same issue many times, due to different versions of node
and npm
for numbers of web applications.
For that, we are just using the below command to take proper node-sass supported versions.
npm install node-sass
ornpm install node-sass -g
then try to rebuild the node-sass with,
npm rebuild node-sass
ornpm rebuild node-sass -f
After that all, if required then we can rebuild all packages and npm start
or npm run watch
and then the application is working properly.
try this, add/modify your package.json
"node-sass": "*",
and run
npm install
Uninstall and reinstall node-sass. Consider moving to dart sass because node-sass is now deprecated.
Switching Node version to 12.18.x worked for me.
I solved it with npm rebuild node-sass --force
, in my case I had to do it as sudo
check your node version in pc & project node version. If it's different u will get the issue. The best way is to use nvm for different node projects
I tried the suggestions above (rebuild, uninstall, reinstall, etc.) and was getting this error: Node Sass is no longer supported. Please use sass
or sass-embedded
instead.
I switched to sass
and that fixed it for me. Didn't have to change anything else. My project is several years old and that's all I needed to do when trying to run it on a new machine.
npm uninstall node-sass
npm i sass
npm rebuild sass
本文标签: javascriptBuild Fails npm rebuild nodesass forceStack Overflow
版权声明:本文标题:javascript - Build Fails: `npm rebuild node-sass --force` - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736926402a1956634.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
node_module
folder & reinstall it – felixmosh Commented Nov 2, 2018 at 20:18npm cache clean
after deleting thenode_module
folder and before runningnpm-install
. – Marvin WordWeaver Parsons Commented Nov 2, 2018 at 20:28ignore-scripts=true
in your .npmrc? – Ry- ♦ Commented Nov 3, 2018 at 1:40