gpt4 book ai didi

npm 修剪坏的 PATH?无法执行安装脚本

转载 作者:行者123 更新时间:2023-12-04 21:30:37 27 4
gpt4 key购买 nike

当我跑 npm prune我收到以下(详细)错误

npm info lifecycle elm@0.19.0-bugfix2~install: elm@0.19.0-bugfix2

> elm@0.19.0-bugfix2 install node_modules/elm
> binwrap-install

sh: 1: binwrap-install: not found
npm verb lifecycle elm@0.19.0-bugfix2~install: unsafe-perm in lifecycle true
npm verb lifecycle elm@0.19.0-bugfix2~install: PATH: /tmp/build/.heroku/node/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/tmp/build/apps/web/node_modules/elm/node_modules/.bin:/tmp/build/.heroku/node/bin:/tmp/build/.platform_tools:/tmp/build/.platform_tools/erlang/bin:/tmp/build/.platform_tools/elixir/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
npm verb lifecycle elm@0.19.0-bugfix2~install: CWD: node_modules/elm
npm info lifecycle elm@0.19.0-bugfix2~install: Failed to exec install script
npm timing action:install Completed in 79ms
npm verb unlock done using /app/.npm/_locks/staging-4628ace6b39e4e32.lock for /tmp/build/apps/web/node_modules/.staging
npm timing stage:rollbackFailedOptional Completed in 62ms
npm timing stage:runTopLevelLifecycles Completed in 6364ms
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64

npm verb stack Error: elm@0.19.0-bugfix2 install: `binwrap-install`
npm verb stack spawn ENOENT
npm verb stack at ChildProcess.<anonymous> (/tmp/build/.heroku/node/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
npm verb stack at ChildProcess.emit (events.js:182:13)
npm verb stack at maybeClose (internal/child_process.js:961:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
npm verb pkgid elm@0.19.0-bugfix2
npm verb cwd /tmp/build/apps/web
npm verb Linux 4.15.0-36-generic
npm verb argv "/tmp/build/.heroku/node/bin/node" "/tmp/build/.heroku/node/bin/npm" "prune" "--verbose"
npm verb node v10.7.0
npm verb npm v6.1.0
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! elm@0.19.0-bugfix2 install: `binwrap-install`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the elm@0.19.0-bugfix2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 6866ms

找不到 binwrap-install我认为这是因为 PATH是不正确的。我验证了二进制文件存在于此处。
ls -l node_modules/.bin/binwrap-install
lrwxrwxrwx 1 js js 30 Nov 9 23:48 node_modules/.bin/binwrap-install -> ../binwrap/bin/binwrap-install

但是, PATH在上面的错误输出中不包括
node_modules/.bin

相反,它包括
node_modules/elm/node_modules/.bin

在详细日志的更高层,我看到了这可能是相关的。
npm info linkStuff binwrap@0.2.0
npm verb linkBins [ { 'binwrap-install': 'bin/binwrap-install',
npm verb linkBins 'binwrap-prepare': 'bin/binwrap-prepare',
npm verb linkBins 'binwrap-test': 'bin/binwrap-test' },
npm verb linkBins '/tmp/build/apps/web/node_modules/elm-format/node_modules/.bin',
npm verb linkBins false ]
npm info linkStuff fstream@0.1.31
npm info linkStuff unzip@0.1.11
npm info linkStuff binwrap@0.1.4
npm verb linkBins [ { 'binwrap-install': 'bin/binwrap-install',
npm verb linkBins 'binwrap-test': 'bin/binwrap-test' },
npm verb linkBins '/tmp/build/apps/web/node_modules/.bin',
npm verb linkBins false ]

这是预期的行为还是某个地方的错误?我可以做些什么来制作 PATHnpm prune包括 node_modules/.bin文件夹?

最佳答案

尝试切换到 Elm 0.19.1。

我遇到了同样的问题,现在使用 Elm 0.19.1 似乎已经停止发生。最新的 npm 安装程序 no longer relies on binwrap ,我认为这可能是问题所在。

关于npm 修剪坏的 PATH?无法执行安装脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53237172/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com