yarn
yarn copied to clipboard
Yarn not rebuilding node-sass
Do you want to request a feature or report a bug? possibly bug
What is the current behavior? I am using yarn in my CI/CD platform yarn install then I use webpack to build my bundle I get an error at this point:
Module build failed: Error: Missing binding /mydirectory/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
Found bindings for the following environments:
- Linux 64-bit with Node.js 4.x
I tried to run yarn cache clean first, but it didn't help. It is working if I run yarn install --force though So it seems that when yarn install is run, it doesn't rebuild node-sass. I have no idea why
If the current behavior is a bug, please provide the steps to reproduce. Will try to do that but first I wanna see if I am missing something obvious
What is the expected behavior? node-sass to be built when cache is empty and yarn install is run
Which version of Yarn are you using?
v1.3.2
Same problem, downgraded to 1.2.1 and all works.
Likewise, yarn 1.2.1 and then downgrading Node to 6.x.x worked for me.
yarn install --force worked for me (just as OP said). Using Node v8.9.4.
is this still an issue?
I have this issue with yarn --ignore-scripts --pure-lockfile --frozen-lockfile in circleci. Only solution I've found is to run npm rebuild node-sass. This happens regardless of having no caches or restoring node_modules and yarn's cache from cache.
This is definitely still an issue, I've been fighting with Heroku deployments all day because of it.
node v8.9.1 npm 5.6.0 yarn 1.7.0
I have same problem. But my module is grpc-node
Not sure if my problem is related, but I run a bash console on Heroku and found out that node_modules/node-sass and node_modules/.bin/node-sass (symlink) were not there. And...
This didn't work: yarn install -D node-sass (devDependencies) 👎
This did work: yarn install node-sass (dependencies) 👍
Maybe it helps 🤷♂️
Same problem with: Node: v10.6.0 NPM: 6.1.0 Yarn: 1.7.0
Same problem in our CI server (using Docker image node-8-alpine) after bumping [email protected] to [email protected]:
Node: v8.11.3
NPM: 5.6.0
Yarn: 1.6.0
We use the --frozen-lockfile option to install dependencies: yarn install --frozen-lockfile. The contents of folder node_modules are cached between builds.
The Problem is solved after temporary adding npm rebuild to the job or clearing node_modules.
Same problem on Jenkins only, using yarn 1.6.0, node 8.11.3.
Workaround yarn install --force works.
I had to switch from node:alpine back to node:10-alpine since Node 11 was released lately.
This is an insanely persistent issue. This bug keeps reappearing randomly all the time.
Same issue here, it is pain in the ass. I had this issue last year with another project and suddenly it worked, I can't even remember what I did to get it working again. Now I have the same issue in another project and it is just a god damn time eating issue. :(
node: v8.5.0 npm: 6.4.1 yarn: 1.15.2
Edit: yarn install --force did the job or one of the plenty things I've tried before. Yet another 2h gone to trial and error because this issue. 😡
I had this issue. I diffed the node_modules before and after yarn install --force. The only difference was there was a file in node_modules/.cache before, and not afterwards. May I suggest clearing this directory as a first attempt at resolving the issue when it occurs again?
You would have to do rm -r node_modules/.cache as yarn cache clean appears to do something different.
I can't say yet whether this is a workaround, but if so, it's a quicker one.
In case it helps anyone, my issue had to do with yarn workspaces. I had two frontend packages that were using node-sass but only one of them had it listed under package.json. When I pulled the other package out of the monorepo and tried to use it independently, I got the error described here. After adding it to "devDependencies", everything worked fine.
After adding it to "devDependencies", everything worked fine.
I had similar issue in a CRA and Electron setup... While a yarn remove node-sass && yarn add remove-sass && prefix to my scripts fixed the problem temporarily, moving node-sass to devDependencies is the permanent solution! Thanks so much.
For Rails/Webpacker/Heroku, I had to move node-sass from devDependencies to dependencies in package.json. That fixed it.
I managed to solve this problem by removing the node_modules folder and yarn.lock files then run yarn install --force afterwards.
yarn add node-sass did it for me!
yarn install --force really just worked for me.
Just on a side note:
yarn install v1.21.1
error `install` has been replaced with `add` to add new dependencies. Run "yarn add node-sass" instead.
I've experienced that problem (yarn is not pulling accurate build of node-sass) after upgrading node version.
Because I will definitely find this thread again: consult the releases page and make sure your node is compatible with your node-sass: https://github.com/sass/node-sass/releases
You may need to downgrade your Node or upgrade some of your dependencies. This isn't super clear from the build failure message.
I met the problem recently, and I found the problem issued inside copyModules.
After removing possibleExtraneous, yarn linked a wrong version node-sass binding file, which in my case is darwin-x64-88/binding.node. Actually, the node version I was using is 10.19.0.
Rebooting the computer worked for me.
After that yarn install worked just fine.
Rebooting the computer worked for me. After that
yarn installworked just fine.
I think rebooting is the perfect cure for any PC problems 😁😅😆