npm -v): 6.0.1node -v): v8.11.2node -p process.versions): { http_parser: '2.8.0',
node: '8.11.2',
v8: '6.2.414.54',
uv: '1.19.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
nghttp2: '1.29.0',
napi: '3',
openssl: '1.0.2o',
icu: '60.1',
unicode: '10.0',
cldr: '32.0',
tz: '2017c' }
node -p process.platform): undefinednode -p process.arch): x64node -p "require('node-sass').info"): Error: Cannot find module 'node-sass'npm ls node-sass): npm ERR! missing: [email protected], required by [email protected]I'm having some problems. Let me try to take you down the steps I took to get me in this situation.
Yesterday, everything was working great! Then I did _something_.. I don't exactly know what I did, but I updated some file from 4.4.0 to 4.7.0.. I think it was either Ionic, Cordova, or NPM related.
After updating I got an error saying that Angular CLI is not compatible with my version of Node. For some reason I decided to follow this tutorial to fix: https://github.com/angular/angular-cli/issues/10527 saying:
- Download and save a local copy of the correct version of node-sass binary - win32-x64-64_binding.node. For example download it to the following location:
C:node-sasswin32-x64-64_binding.node- Provide reference to the full path of the node-sass binary file in the sass_binary_path npm configuration parameter (in the ~/.npmrc file):
npm config set sass_binary_path
For example,
npm config set sass_binary_path C:node-sasswin32-x64-64_binding.node- Run the npm install command again to install @angular/cli correctly.
- Execute ng serve or npm start and your should be past the problem.
So I changed the node-sass path. I was still having some issues and realized that to fix I literally just had to download the latest version of NodeJS, which I ended up doing.
I then did npm install on a project I was working on, which then gave me a lovely error:
Failed at the [email protected] postinstall script.
I tried doing npm rebuild node-sass --force which did nothing, unfortunately.
At this point it must've been hour 10 of trying to figure out what the heck was going on, so out a fit of frustration I decided to do a Windows 10 recovery for the previous day. But no, I still have problems.
Here is the error report after doing npm install:
Binary found at C:node-sasswin32-x64-64_binding.node
Testing binary
Binary has a problem: { Error: Cannot find module 'C:node-sasswin32-x64-64_binding.node'
// warnings
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\xampp\htdocs\project x\projectx\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\xampp\htdocs\project x\projectx\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\xampp\htdocs\project x\projectx\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\xampp\\htdocs\\project x\\projectx\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\xampp\htdocs\project x\projectx\node_modules\node-sass
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of firebase@^5.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of firebase@^2.4.0 || 3.x.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Simon K\AppData\Roaming\npm-cache\_logs\2018-05-27T21_04_57_478Z-debug.log
What should I do? I've been struggling with this for _hours_! Any help, please?
You can't use 4.7.2 with Node 10. Please delete your node_modules and re-install with a supported Node + node-sass combination.
Those instructions on that other thread are bad and will give you a broken workspace
@nschonni sorry do you mind giving a slightly more detailed answer? I'm on Node v8.11.2, do I downgrade further? and by re-install do you mean npm install?
npm update node-sass@latest
@xzyfer this does nothing I'm afraid. I also just tried completely uninstalling node from my machine and I'm still having this issue..
Sounds like you're having multiple different issues unrelated to node-sass.
Make sure the version of node-sass is compatible with your version of node,
then delete your nodd_modules and run npm.
npm ls node-sass will tell you the version you've installed. Check the
release notes for that version to which Node versions are supported.
Beyond that this is not a node-sass issue.
On Mon., 28 May 2018, 7:26 pm Simon, notifications@github.com wrote:
@xzyfer https://github.com/xzyfer this does nothing I'm afraid. I also
just tried completely uninstalling node from my machine and I'm still
having this issue..—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2397#issuecomment-392574539,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWO_ozoHbDffjfD7D-R7knAaWu__5ks5t3DMygaJpZM4UPb88
.
I have this problem too :(
please help me
Did anyone resolve this issue?
The solution is always to make to sure your version Node (node --version) is supported by your node-sass version (npm ls node-sass).
Check the support table at the bottom of the release notes i.e. https://github.com/sass/node-sass/releases/tag/v4.7.2.
Run npm update node-sass to install the latest node-sass.
I have a v8.11.2 node version, 4.9.0 node-sass version and 6.1.0 NPM version. I have this issue everywhere when I want to install gulp-sass... I don't install node-sass, but only gulp-sass.
What exactly is the issue you're seeing. By commenting on an old issues you've not given us the information required to begin helping.
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/pawelkieryk/Desktop/TEST/node_modules/node-sass/build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/pawelkieryk/Desktop/TEST/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/pawelkieryk/Desktop/TEST/node_modules/node-sass
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/pawelkieryk/.npm/_logs/2018-06-05T14_22_36_001Z-debug.log
I have error as above
Your issue is very different.
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/pawelkieryk/Desktop/TEST/node_modules/node-sass/build'
You have a permission issue. For some reason you cannot write to the directory.
Check the permissions for that folder. What command you running?
I am working on MacBook (I am very new in macOS). I running: sudo npm install gulp-sass
You should avoid using sudo with npm, it will break things in weird a wonderful ways. Removing sudo should fix your issue.
I fixed it with this command that I found in another thread on github: sudo npm install -g electron --unsafe-perm=true --allow-root
dont use sudo
I have the same problem, can't download exactly node sass, wrote this command
npm install node-sass --save-dev
I tried many solutions, nothing helps, always gives errors,
npm ERR! Failed at the [email protected] postinstall script. and some others
@AnnieManu
if your project is new, create that again and don't use ''sudo'' for project installation
Most helpful comment
You should avoid using sudo with npm, it will break things in weird a wonderful ways. Removing sudo should fix your issue.