-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Error: ENOENT: no such file or directory, scandir '**/node_modules/node-sass/vendor' #1579
Comments
It appears that there was a permissions issue running install.js. I'm not sure why it was doing it intermittently, but I simply changed the access rights to the build folder. NPM seems to not give you a notification if install.js fails to run correctly. |
Simlar problem with node-sass v3.7.0. I get the following error: In the package.json file it is looking for the "vendor" directory, which doesn't exist: "files": [ Rolling back "node-sass" to "3.4.0" temporarily fixed the issue for me. However, I am now locked into this version. |
Note your Gulp-Sass installation referenced above is installing: But when you do it manually you are installing: Version 3.4.2 doesn't have "vendor" in the "files" array I referred to in previous comment, but version 3.7.0 does. package.json version 3.4.2: package.json version 3.7.0: |
The vendor directory is created during npm install. Try deleting your
|
Just to update from my end. I found that for some reason no matter what I did even after the permissions issue was resolved, it still wouldn't always run the install.js script. I also noticed it tends to happen when its only part of a large set of downloads. As a safe guard, I just started running the install.js file after NPM Install command part of my build. This ensured that the vendor folder was always present. Can't explain why the install file doesn't always get ran on each build. So my build script looks like this:
|
npm will only execute install scripts for direct dependencies in your package.json. This is a performance optimisation on their end which is unfortunate.
|
This problem was happening on a build server where the folder was clean on each build. So your suggestion of deleting the node_modules folder didn't fix the issue in my case as there wasn't a node_modules folder to begin with. I don't know enough about how NPM works to comment on your bit of information. If you want me to do any additional logging, I can still reproduce the problem fairly consistently. However, I have my work around for now 👍 However, seeing no one else has reported this until now, whatever it is, its not widespread. Probably not good utilization of time. |
This commonly happens in CI systems because they'll typically run In this case, running |
Can you please help me figure out what's causing the issue? Here's how I can reproduce it:
But after
UPD Can't reproduce anymore. |
Node-sass-middleware has a dependency module, node-sass, which needs to get installed first. Unfortunately, for some reason, the current version of node-sass does not properly run its install script to download the binary file it needs to operate. See sass/node-sass#1579 for more details. To fix this, we hadd an 'enact' script to elasticbeanstalk configuration, to tell it to run the node-sass installer manually during deployment. This ensures that the binary file gets installed.
Node-sass-middleware has a dependency module, node-sass, which needs to get installed first. Unfortunately, for some reason, the current version of node-sass does not properly run its install script to download the binary file it needs to operate. See sass/node-sass#1579 for more details. To fix this, we hadd an 'enact' script to elasticbeanstalk configuration, to tell it to run the node-sass installer manually during deployment. This ensures that the binary file gets installed.
I ran this for every package that gave ENOENT and now everything if working. for some reason the install script wasn't invoked when i ran |
(for fellow search engine travellers) |
@PixnBits thank you, this is good to know. How did you manually publish node-sass? How can one reproduce this? |
Had the same problem. After running
Everything worked fine |
I have same problem, run |
react@>=0.12.2 <0.15.0 but none was installed." - added 'npm rebuild node-sass'. For more information: sass/node-sass#1579 Change-Id: Ia3fdf59e3b3dfc8b9686801c63f48b7f1c10e3aa Reviewed-on: http://bellevue-ci.eng.vmware.com:8080/4764 Reviewed-by: Zahari Ivanov <zaharii@vmware.com> Reviewed-by: Tony Georgiev <tgeorgiev@vmware.com> CS-Verified: jenkins <jenkins@vmware.com> Bellevue-Verified: jenkins <jenkins@vmware.com>
react@>=0.12.2 <0.15.0 but none was installed." - added 'npm rebuild node-sass'. For more information: sass/node-sass#1579 Change-Id: Ia3fdf59e3b3dfc8b9686801c63f48b7f1c10e3aa Reviewed-on: http://bellevue-ci.eng.vmware.com:8080/4765 Reviewed-by: Tony Georgiev <tgeorgiev@vmware.com> Bellevue-Verified: e_vcoauto_glob_1 <e_vcoauto_glob_1@vmware.com> CS-Verified: e_vcoauto_glob_1 <e_vcoauto_glob_1@vmware.com>
npm rebuild node-sass I have same problem, run npm rebuild node-sass resolve it. |
@saper probably an npm issue, but from memory:
Granted this cause may be moot as the proper way to "mirror" a registry is not to manually publish to the mirror, but to pull both metadata and tgz from the source registry. |
* Workaround for issue sass/node-sass#1579
I had the same issue. My installed version for |
My Solution: I deleted the |
hi, npm rebuild node-sass |
This is a yarn bug that is meant to be fixed in yarn 1.6.0. please open
yarn issue with the yarn repo.
…On Wed., 9 May 2018, 11:27 am Ralf Stich, ***@***.***> wrote:
hi,
reinstalling only works once...
after every 'yarn add' or 'yarn install' the node-sass vendor folder is
deleted.
only solution (for me) currently:
npm rebuild node-sass
outside from yarn!!! (executing in script from yarn e.g 'yarn
node:rebuild' does not work !)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1579 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWHC52uxRrZyqK9BorKM9vEEDgixJks5twrZogaJpZM4Ivk6Q>
.
|
i still have this error with yarn 1.6.0 |
@mrking Thanks |
Create the vendor directory in node_sass directory . It worked for me. mkdir '...../node_modules/node-sass' |
Having this issue, using npm... node-sass 4.11.0 |
try running it worked for me |
This problem started appearing after rebuilding our docker image today (no change to Dockerfile content), reverting back to old docker image works. the docker file looks like this:
so the problem is one of the following:
The weird thing is, even after fixing the version of yarn and lerna, the problem still exists:
|
Same issue suddenly appeared magically in Dockerfile builds. Downgraded npm 6.6 to 6.5 and then it worked again. |
Update:
Not sure if there's a way to avoid that. |
Followed the troubleshooting guide. I'm having an intermittent build issue with one of our projects. The appearance is that it happens randomly.
See comment for solution
I'm using
gulp-sass@2.1.0
which has this as a dependency.I suspect there might be some sort of concurrency issue with the download of binaries in that specific folder. I've tried switching to several different node and npm versions now to see if the problem is related but hasn't resolved the issue.
Ubuntu 16.04
On builds that do run successfully, I'll get the following message before NPM quits
Otherwise this error will happen during the build
Gulp Sass installation doesn't seem to be catching the Vendor binaries every time even manually installing.
But installing node-sass manually seems to force the binaries to get downloaded
The text was updated successfully, but these errors were encountered: