Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/node-sass/vendor no such file or directory in node-sass@3.13.0 #1812

Closed
yangblink opened this issue Nov 19, 2016 · 9 comments

Comments

@yangblink
Copy link

commented Nov 19, 2016

I use sass_binary_path to cache my node-sass binary file, and when i install node-sass@3.13.0 ,
it's show Binary found at /Users/blinkyang/test/node-cache/node-sass/darwin-x64-47_binding.node and install success, but if i run this script node -p "require('node-sass').info" it's throw an error below:

Error: ENOENT: no such file or directory, scandir '/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:856:18)
    at Object.getInstalledBinaries (/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/lib/extensions.js:121:13)
    at foundBinariesList (/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/Users/blinkyang/test/tmp/test-node-sass/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

i think it was because the vendor folder doesn't create after check hasBinary

  • NPM version (npm -v): 3.8.6
  • Node version (node -v):v5.11.0
  • Node Process (node -p process.versions):
   { http_parser: '2.7.0',
  node: '5.11.0',
  v8: '4.6.85.31',
  uv: '1.8.0',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '56.1',
  modules: '47',
  openssl: '1.0.2g' }
  • Node Platform (node -p process.platform): darwin
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
Error: ENOENT: no such file or directory, scandir
  • npm node-sass versions (npm ls node-sass):
test-node-sass@1.0.0 /Users/blinkyang/test/tmp/test-node-sass
└── node-sass@3.13.0
@xzyfer

This comment has been minimized.

Copy link
Contributor

commented Dec 8, 2016

@yqb1989 what's the value of sass_binary_path?

@yangblink

This comment has been minimized.

Copy link
Author

commented Dec 8, 2016

@xzyfer
this is my sass_binary_path

bash-3.2$ npm config get sass_binary_path
/Users/blinkyang/test/node-cache/node-sass/darwin-x64-47_binding.node

bash-3.2$ ls /Users/blinkyang/test/node-cache/node-sass/
darwin-x64-47_binding.node

and darwin-x64-47_binding.node was download here

@xzyfer

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2016

Thanks @yangblink. The bug isn't that vendor hasn't been created, it's that we are trying to load the binding from vendor instead of sass_binary_path.

@xzyfer

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2016

Turns out this behaviour is on purpose, although a little confusing. The npm config is only available during the execution of npm scripts, like during npm install. It's not available in a normal node process.

In your case you should use the SASS_BINARY_PATH environment variable rather than the npm config variable.

@xzyfer xzyfer closed this Dec 10, 2016

@junibrosas

This comment has been minimized.

Copy link

commented May 26, 2017

run npm rebuild node-sass

@lamteck07

This comment has been minimized.

Copy link

commented Jun 19, 2017

Hi, change your node_modules directory permission...
sudo chmod -R 775 /node_modules

zuzust added a commit to adab1ts/veinapp that referenced this issue Jun 26, 2017
zuzust added a commit to adab1ts/veinapp that referenced this issue Jun 26, 2017
zuzust added a commit to adab1ts/veinapp that referenced this issue Jun 26, 2017
@brian-lamb-software-engineer

This comment has been minimized.

Copy link

commented Aug 25, 2017

In my case i didnt realize i needed the node-sass package installed, found that it wasnt in my package.json, simply because on the other app i was running it as, had a remnant node-sass/vendors directory in there with a linux file in it, that didnt get correctly uninstalled i presume so I thougth I had all needed dependency's already.

When i switched envs to windows powershell, and ran npm install, the error came up because it didn't have the vendor file it needed any more. Doing a npm install --save-dev node-sass enabled the sass compiling resolving the isssue. I was doing compiling with webpack.

@qknight

This comment has been minimized.

Copy link

commented Oct 24, 2017

i'm having problems with the way node-sass is installed using yarn: davezuko/react-redux-starter-kit#791 (comment)

can anyone advice me what to do here?

@ershadul

This comment has been minimized.

Copy link

commented Jan 31, 2018

Running sudo npm install resolved the issue. So I believe that it was a node_modules dir permission issue. I did not use sudo on build command. this means npm run build was successful.

@sass sass locked as resolved and limited conversation to collaborators Feb 1, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants
You can’t perform that action at this time.