Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Errors even after npm rebuild + current environment matches the found binding's environment #2882

Closed
brightpixels opened this issue Apr 1, 2020 · 5 comments
Labels

Comments

@brightpixels
Copy link

brightpixels commented Apr 1, 2020

  • NPM version (npm -v): 5.6.0
  • Node version (node -v): 10.0.0
  • Node Process (node -p process.versions):
{
    http_parser: '2.8.0',
    node: '10.0.0',
    v8: '6.6.346.24-node.5',
    uv: '1.20.2',
    zlib: '1.2.11',
    ares: '1.14.0',
    modules: '64',
    nghttp2: '1.29.0',
    napi: '3',
    openssl: '1.1.0h',
    icu: '61.1',
    unicode: '10.0',
    cldr: '33.0',
    tz: '2018c'
}
  • Node Platform (node -p process.platform): win32
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"): Error: ENOENT: no such file, or directory, scandir 'C:\Users......\node-modues\node-sass\vendor'
  • npm node-sass versions (npm ls node-sass): [email protected]

I have successfully installed node-sass with env variable pointing to a local version binary: SASS_BINARY_PATH=/c/......../win32-x64-64_biniding.node npm install node-sass.

When I try to run npm start' in a create-react-app which has .sccs file, I get this error: Error: ENOENT: no such file, or directory, scandir 'C:\Users......\node-modues\node-sass\vendor'

I have tried npm rebuild node-sass with SASS_BINARY_PATH=/c/......../win32-x64-64_biniding.node npm rebuild node-sass it seems to go through successfully BUT npm start gives me this error:

Error: Missing binding C:\Users\............\node-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x

Found bindings for the following environments:
- Windows 64-bit with Node.js 10.x

This usually happens because your environment has changed since running `npm install`. Run `npm rebuild node-sass` to download the binding for your current environment

The last error message is little confusing because the current environment it's displaying and the bindings it's found are exactly the same.

@brightpixels brightpixels changed the title Missing vendor file in secure corporate environment (no access to internet) Missing vendor file in secure corporate environment (no access to internet). Errors even when npm rebuild Apr 1, 2020
@brightpixels brightpixels changed the title Missing vendor file in secure corporate environment (no access to internet). Errors even when npm rebuild Missing vendor file in secure corporate environment (no access to internet). Errors even after npm rebuild Apr 1, 2020
@brightpixels brightpixels changed the title Missing vendor file in secure corporate environment (no access to internet). Errors even after npm rebuild Errors even after npm rebuild: current environment: matches the found binding's environment Apr 1, 2020
@brightpixels brightpixels changed the title Errors even after npm rebuild: current environment: matches the found binding's environment Errors even after npm rebuild + current environment matches the found binding's environment Apr 1, 2020
@saper
Copy link
Member

saper commented Apr 7, 2020

SASS_BINARY_PATH=/c/......../win32-x64-64_biniding.node npm install node-sass

This is unlikely to cause any effect. Can you put your full logs somewhere (on gist.github.com for example?) Please try not to redact paths manually. What filesystem are you running on?

@brightpixels
Copy link
Author

Where do i find the logs?

@saper
Copy link
Member

saper commented Apr 16, 2020

Can you run this

node -p "require('node-sass').info"

with your SASS_BINARY_PATH set and give us a full output?

@saper
Copy link
Member

saper commented Apr 16, 2020

Also, when you run your app, do you have SASS_BINARY_PATH set as well? It isn't obvious from what you say here.

@brightpixels
Copy link
Author

brightpixels commented Apr 20, 2020

@saper Your last point was my solution! my npm start command didn't include setting the path as well. I didn't think I needed it there as well! Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants