wikimedia 包(parsoid、restbase 以及 service-runner 和限制)上的 Npm 安装失败并出现 git 错误,尽管提前复制了源文件并运行
npm install <folder>
或
npm install
从具有 package.json 的实际文件夹或
npm install -g --only=prod --verbose limitation
给出错误的依赖有时是直接依赖,有时是依赖的依赖。
设置 - linux / CentrOS 6
由 ISP 在共享主机上安装的 git,git 重新安装失败
自共享主机以来没有管理员权限
节点 11.12.0,npm 6.9.0
只有 wikimedia 包失败,但不是所有 wikimedia 包
尝试的步骤 - 仅安装生产依赖项
npm cache verify
加上安装前删除相关的 node_module 和 .npm 文件夹编辑 package.json 以仅使用版本替换依赖项的 git 链接,例如 kad
2.5.1
最新版本的 npm 和 node
重新安装节点/nvm/npm
节点 v11.11.0 也失败了
使用 npm list 检查任何依赖问题并提前修复
通过交换到 http 或 git 协议的 git 修复失败并出现相同的错误
正在寻找的依赖项包括
pegjs
卡德
内容类型
错误日志示例:限制包 (3 个依赖项,包括 bluebird、kad、可读流)
135 http fetch GET 200 http://registry.npmjs.org/readable-stream 17ms (from cache)
136 silly pacote range manifest for readable-stream@^2.0.5 fetched in 25ms
137 silly resolveWithNewModule readable-stream@2.3.6 checking installable status
138 silly fetchPackageMetaData error for kad@git+https://github.com/wikimedia/kad.git#master Error while executing:
138 silly fetchPackageMetaData /usr/local/cpanel/3rdparty/lib/path-bin/git ls-remote -h -t https://github.com/wikimedia/kad.git
138 silly fetchPackageMetaData
138 silly fetchPackageMetaData fatal: Unable to find remote helper for 'https'
138 silly fetchPackageMetaData
138 silly fetchPackageMetaData exited with error code: 128
139 timing stage:rollbackFailedOptional Completed in 1ms
140 timing stage:runTopLevelLifecycles Completed in 4749ms
141 verbose stack Error: exited with error code: 128
141 verbose stack at ChildProcess.<anonymous> (/home/mousey/.nvm/.nvm/versions/node/v11.12.0/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
141 verbose stack at ChildProcess.emit (events.js:197:13)
141 verbose stack at maybeClose (internal/child_process.js:988:16)
141 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
142 verbose cwd /home/mousey/.nvm/.nvm/versions/node/v11.12.0/lib/node_modules
143 verbose Linux 2.6.32-896.16.1.lve1.4.54.el6.x86_64
144 verbose argv "/home/mousey/.nvm/.nvm/versions/node/v11.12.0/bin/node" "/home/mousey/.nvm/.nvm/versions/node/v11.12.0/bin/npm" "install" "-g" "--save" "--verbose" "--only=prod" "service-runner"
145 verbose node v11.12.0
146 verbose npm v6.9.0
147 error Error while executing:
147 error /usr/local/cpanel/3rdparty/lib/path-bin/git ls-remote -h -t https://github.com/wikimedia/kad.git
147 error
147 error fatal: Unable to find remote helper for 'https'
147 error
147 error exited with error code: 128
148 verbose exit [ 1, true ]