对于 npm install from folder,尽管已经安装了依赖项(共享主机),但维基媒体包出现 git 错误
for npm install from folder gives git error for wikimedia packages despite dependencies already being installed (shared hosting)
维基媒体包(parsoid、restbase、加上服务运行器和限制)上的 Npm 安装失败并出现 git 错误,尽管已经提前复制了源文件,并且 运行
npm install <folder>
要么
npm install
来自实际文件夹,其中有一个 package.json
或者
npm install -g --only=prod --verbose limitation
给出错误的依赖项有时是直接依赖项,有时是依赖项的依赖项。
设置
- linux / CentrOS 6
git 由 ISP 安装在共享主机上,git 重新安装失败
共享主机后没有管理员权限
节点 11.12.0,npm 6.9.0
只有维基媒体包失败,但不是所有维基媒体包
尝试的步骤
- 仅安装生产依赖项
npm cache verify
并在安装前删除相关 node_module 和 .npm 文件夹
编辑 package.json 以仅用版本替换 git link 依赖项,例如 kad 2.5.1
最新版本的 npm 和 node
重新安装 node/nvm/npm
节点 v11.11.0 也失败了
使用 npm list 检查任何依赖问题并提前修复
git 通过切换到 http 或 git 协议修复失败并出现相同的错误
正在查找的依赖项包括
pegjs
kad
内容类型
示例错误日志:限制包
(3 个依赖项,包括 bluebird、kad、readable-stream)
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 ]
尝试将其添加到您的 .gitconfig 文件中。 git+http/ssh 遥控器在 npm 中存在一个已知问题。
[url "https://github.com/"]
insteadOf = git@github.com:
insteadOf = git://github.com/
insteadOf = git+https://github.com/
insteadOf = git+ssh://git@github.com:
insteadOf = ssh://git@github.com:
insteadOf = ssh+https://git@github.com/
Git路径设置错误,导致git错误:
Unable to find remote helper for 'https'
.
git --exec-path
揭示了 git 问题
我仍然不明白为什么在所有文件都是本地文件并且已经安装了从 git 中提取的软件包时还需要 git。
维基媒体包(parsoid、restbase、加上服务运行器和限制)上的 Npm 安装失败并出现 git 错误,尽管已经提前复制了源文件,并且 运行
npm install <folder>
要么
npm install
来自实际文件夹,其中有一个 package.json
或者
npm install -g --only=prod --verbose limitation
给出错误的依赖项有时是直接依赖项,有时是依赖项的依赖项。
设置 - linux / CentrOS 6
git 由 ISP 安装在共享主机上,git 重新安装失败
共享主机后没有管理员权限
节点 11.12.0,npm 6.9.0
只有维基媒体包失败,但不是所有维基媒体包
尝试的步骤 - 仅安装生产依赖项
npm cache verify
并在安装前删除相关 node_module 和 .npm 文件夹编辑 package.json 以仅用版本替换 git link 依赖项,例如 kad
2.5.1
最新版本的 npm 和 node
重新安装 node/nvm/npm
节点 v11.11.0 也失败了
使用 npm list 检查任何依赖问题并提前修复
git 通过切换到 http 或 git 协议修复失败并出现相同的错误
正在查找的依赖项包括
pegjs
kad
内容类型
示例错误日志:限制包 (3 个依赖项,包括 bluebird、kad、readable-stream)
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 ]
尝试将其添加到您的 .gitconfig 文件中。 git+http/ssh 遥控器在 npm 中存在一个已知问题。
[url "https://github.com/"]
insteadOf = git@github.com:
insteadOf = git://github.com/
insteadOf = git+https://github.com/
insteadOf = git+ssh://git@github.com:
insteadOf = ssh://git@github.com:
insteadOf = ssh+https://git@github.com/
Git路径设置错误,导致git错误:
Unable to find remote helper for 'https'
git --exec-path
揭示了 git 问题
我仍然不明白为什么在所有文件都是本地文件并且已经安装了从 git 中提取的软件包时还需要 git。