This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 746
npm7 下 addon 安装淘宝源和官方源的行为不一致 #1667
Comments
看来又是精简 json 返回的数据有问题 npmmirror curl -v https://registry.npmmirror.com/xprofiler -H 'accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, /' |json|less npm 官方,多了一个 |
fengmk2
added a commit
that referenced
this issue
Nov 7, 2021
avoid npm abbreviated version fields change closes #1667
fengmk2
added a commit
that referenced
this issue
Nov 7, 2021
avoid npm abbreviated version fields change closes #1667 and starting use the new domain: npmmirror.com
@hyj1991 fixed now npm i xprofiler --registry=https://registry.npmmirror.com
added 92 packages in 4s
tree node_modules/xprofiler
node_modules/xprofiler
├── LICENSE
├── README.md
├── bin
│ ├── xprofctl
│ └── xprofctl.json
├── binding.gyp
├── build
│ └── binding
│ └── Release
│ └── node-v93-darwin-x64
│ └── xprofiler.node
├── index.d.ts
├── lib
│ ├── clean.js
│ ├── configure.js
│ ├── utils.js
│ └── xctl.js
├── package.json
|
libc cnpm/npminstall#386 |
我这边发现 npm 8 也是一样的问题,在安装 xprofiler 时必须要指定官方的源才能安装成功。 |
我对比了下,就是缺少了 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
复现步骤
npm i npm -g
将 npm 升级到最新 (当前是7.24.1
)npm set registry https://registry.npmjs.org
指向官方源npm i xprofiler
安装成功npm set registry https://registry.npm.taobao.org
指向淘宝源npm i xprofiler
安装失败失败信息
大致原因
npm7
指向官方源时,install 会根据返回信息正常使用xprofiler
包的package.json
定义的install
脚本来安装:这样就是正常安装。
而
npm7
指向淘宝源时,install 返回的信息里package.json
定义的install
为空,所以链到 cli 默认的node-gyp rebuild
来安装 addon 导致失败。更多信息
使用
npm6
及以下的 npm cli 安装不管是官方源还是淘宝源都是正常的。The text was updated successfully, but these errors were encountered: