0

After installing npm I get the following error report

info it worked if it ends with ok
verbose cli [ 'node', '/home/ash/local/bin/npm' ]
info using npm@1.0.30
info using node@v0.4.12
verbose config file /home/ash/.npmrc
verbose config file /home/ash/local/etc/npmrc
ERR! Error: ENOENT, No such file or directory
ERR! Report this *entire* log at:
ERR!     <http://github.com/isaacs/npm/issues>
ERR! or email it to:
ERR!     <npm-@googlegroups.com>
ERR! 
ERR! System Linux 2.6.38-11-generic
ERR! command "node" "/home/ash/local/bin/npm"
ERR! cwd /home/ash
ERR! node -v v0.4.12
ERR! npm -v 1.0.30
verbose exit [ 1, true ]

I have installed node and npm using the method outlined in this gist using the "git all the way method". However I changed the directory locations for the npm and node repos.

It is set up like so

~/
    Apps/
    Dev/
        node/   << node repo
        npm/    << npm repo
    local/  << default setup location as outlined in the gist

Does anyone know what's going wrong here.

EDIT

Bash history

$ mkdir ~/local
$ echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
$ . ~/.bashrc

$ cd Apps/Dev/node
$ ./configure --prefix=~/local
$ make install

$ cd ../npm
$ sudo PATH=~/local/bin:$PATH make install
$ export PATH=~/local/bin:$PATH >> ~/.bashrc
4

1 回答 1

0

这是一个类似的问题:

https://github.com/isaacs/npm/issues/1004

事实证明,在 ~/.gitignore 文件中列出“bin”并不是一个好主意(它将从安装包中排除 npm/bin)

在过去的 2 年里,我可能没有碰过我的 ~/.gitignore - 原来它充满了相当愚蠢的东西。春季大扫除 ~/.gitignore 解决了这个问题。任务完成,npm v1.0.9-1 现已成功安装 (phew)

另外:你有目录“/home/ash/local/etc/npmrc”吗?

于 2011-09-22T04:00:54.500 回答