[英]What does "npm:" prefix in dependency section in package.json mean?
I am wondering what does that mean:我想知道这是什么意思:
"dependencies": {
"@mui/styled-engine": "npm:@mui/styled-engine-sc@5.3.0",
}
What is that npm:
prefix? npm:
前缀是什么?
https://github.com/npm/cli/commit/b7b54f2d18e2d8d65ec67c850b21ae9f01c60e7e https://github.com/npm/cli/commit/b7b54f2d18e2d8d65ec67c850b21ae9f01c60e7e
this commit introduced aliasing to npm cli此提交将别名引入 npm cli
Probably telling npm where to get the package from (in this case npm): https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies可能告诉 npm 从哪里获取 package(在本例中为 npm): https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies
There's also file:
and git:
as you can see.还有
file:
和git:
如您所见。
I've used this code for many times:我已经多次使用此代码:
"dependencies": {
"node-sass": "npm:sass@x.y.z",
}
It makes npm download sass instead of node-sass.它使 npm 下载 sass 而不是 node-sass。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.