Can't install node-sass with NPM 5.0.0

osed
hheexx opened this issue on 1 Jun · 9 comments

Comments

Projects
None yet
7 participants
@hheexx@nschonni@xzyfer@oceanapplications@marc1n@seneyr@ruchern
@hheexx

hheexx commented on 1 Jun • edited

> node-sass@4.5.3 install C:\Users\hexbo\Documents\cx_public\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/vhttps://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/vhttps://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-48_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

npm config set proxy http://example.com:8080

> node-sass@4.5.3 postinstall C:\Users\hexbo\Documents\cx_public\node_modules\node-sass
> node scripts/build.js
Can't install with NPM 5.0.0
It works with NPM 4.6.1
Node v6.9.2
Windows 10

 nschonni added the NPM - Install label on 1 Jun

 wopian referenced this issue in wopian/hatayama on 1 Jun

 Merged

Update require-dir to the latest version 🚀 #69

@nschonni
Contributor

nschonni commented on 1 Jun

Actually the line would be https://github.com/sass/node-sass/blob/master/lib/extensions.js#L240 where is is somehow resolving pkg.version with https://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz

@nschonni nschonni added External - NPM and removed NPM - Install labels on 1 Jun

 xzyfer referenced this issue in npm/npm on 1 Jun

 Open

URL instead of version number being saved in `package.json` #15050

1 of 13 tasks complete
@xzyfer
Contributor

xzyfer commented on 1 Jun • edited

This is likely due to changes to shrinkwrap in npm@5. Please try npm@latest. If the problem persist please comment on npm/npm#15050 or open an issue with npm and ping me in it.
@xzyfer
Contributor

xzyfer commented on 1 Jun

Please don't comments on this issue. This is out of our hands for now. Downgrade to npm@4 in the mean time.
Leaving this issue open incase someone comes up with a work around. Unhelpful "me too" comments will be removed.
@oceanapplications
I experienced this problem by running npm install with an older version of npm, updating npm and running install again.
My solution was to delete package-lock.json and run npm install while on the latest version of npm.
@marc1n

marc1n commented on 3 Jun • edited

As a workaround, manually change entry in package-lock.json or npm-shrinkwrap.json
from:
    "node-sass": {
"version": "https://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-48_binding.node",
"integrity": "..."
},
to:
    "node-sass": {
"version": "4.5.3",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-48_binding.node",
"integrity": "..."
},
@xzyfer
Contributor

 xzyfer commented on 3 Jun

@seneyr

seneyr commented on 3 Jun

Echoing what @xzyfer recommends...
Deleting the local npm cache and the node_modules directory and then rebuilding the shrinkwrap file is ultimately what worked for my team's project.
Depending on your preferences for installing newer dependencies you might also want to downgrade dependencies back to their previous versions using npm install @Version in case they are upgraded during the npm install command.
@ruchern

ruchern commented on 5 Jun

I would like to report back/update that this issues seemed to be resolved with npm 5.0.2 @xzyfer

 craig-mulligan referenced this issue in resin-io-modules/resin-components on 5 Jun

 Open

install fails on node 8 + npm 5 #15

@xzyfer
Contributor

xzyfer commented on 6 Jun

My understanding is that is due to files left over by previous npm versions.
rm -rf node_modules
rm package-lock.json
npm cache clean
npm install

 xzyfer closed this on 6 Jun

 nschonni locked and limited conversation to collaborators on 15 Jun

 nschonni deleted a comment from ruchern on 15 Jun

 nschonni deleted a comment from vprasanth on 15 Jun

 nschonni deleted a comment from giovannyc28 on 15 Jun

Sign up for free to subscribe to this conversation on GitHub. Already have an accou

댓글 쓰기

0 댓글