1

我在本地运行 heroku web:

$ heroku local web

我收到了这个错误:

[OKAY] Loaded ENV .env File as KEY=VALUE Format
13:24:25 web.1   |  /bin/sh: 1: npm: not found
13:24:25 web.1   Exited with exit code 127

我的 npm 版本是:

$ npm -v
5.5.1

我不知道这里有什么问题。有人可以帮我解决这个问题吗?谢谢

这是 nvm dedbug 输出:

$ nvm debug
nvm --version: v0.33.5
$SHELL: /bin/bash
$HOME: /home/martin
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 17.10  
curl: /usr/bin/curl, curl 7.55.1 (x86_64-pc-linux-gnu) libcurl/7.55.1 OpenSSL/1.0.2g zlib/1.2.11 libidn2/2.0.2 libpsl/0.18.0 (+libidn2/2.0.2) librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.19.1 built on linux-gnu.
git: /usr/bin/git, git version 2.14.1
grep: /bin/grep (grep --color=auto), grep (GNU grep) 3.1
awk: not an option: --version
awk: /usr/bin/awk, 
sed: /bin/sed, sed (GNU sed) 4.4
cut: /usr/bin/cut, cut (GNU coreutils) 8.26
basename: /usr/bin/basename, basename (GNU coreutils) 8.26
rm: /bin/rm, rm (GNU coreutils) 8.26
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.26
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.7.0-git
nvm current: v6.10.3
which node: $NVM_DIR/versions/node/v6.10.3/bin/node
which iojs: 
which npm: $NVM_DIR/versions/node/v6.10.3/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.10.3
npm root -g: $NVM_DIR/versions/node/v6.10.3/lib/node_modules

这是 npm 的输出:

$ which npm
/home/martin/.nvm/versions/node/v6.10.3/bin/npm
4

0 回答 0