Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
795 views
in Technique[技术] by (71.8m points)

npm install - NPM restore attempting to retrieve non-existent node-sass

I'm trying to understand how NPM is coming up with this specific non-existent URL to retrieve node-sass.

My package.json includes:

  "dependencies": {
    "node-sass": "<=4.5.3",
    "request": "<=2.81.0",
    "shrinkwrap": "^0.4.0"
  },

From VS2019 I perform a restore on the package.json. One of the first things it tries to install is node-sass, but it generates a request for a release asset that doesn't exist:

> [email protected] install C:DevLegacyProjectDevLegacyProject.Web
ode_modules
ode-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-72_binding.node": 
HTTP error 404 Not Found

This release exists, but in the assets of that release there is no asset with a "-72" for this release: win32-x64-72_binding.node: https://github.com/sass/node-sass/releases/tag/v4.5.3

What does this "-72" specify in the asset naming convention?
Why would it be trying to install a non-existent release asset? In other words, how does it come up with this specific URL?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The suffixes like -72 relate to the Node version for which that binary was built, per e.g. https://github.com/sass/node-sass#node-version-support-policy:

NodeJS Supported node-sass version Node Module
Node 16 6.0+ 93
Node 15 5.0+ 88
Node 14 4.14+ 83
Node 13 4.13+, <5.0 79
Node 12 4.12+ 72
Node 11 4.10+, <5.0 67
Node 10 4.9+, <6.0 64
Node 8 4.5.3+, <5.0 57
Node <8 <5.0 <57

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...