安装 NPM for Node.js 后出错
安装 npm 后,我收到以下错误报告
info it worked if it ends with ok
verbose cli [ 'node', '/home/ash/local/bin/npm' ]
info using [email protected]
info using [email protected]
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! <[email protected]>
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 ]
我已使用 this gist 中概述的方法安装了 Node 和 npm “git 一路方法”。不过,我更改了 npm 和节点存储库的目录位置。
它的设置就像这样
~/
Apps/
Dev/
node/ << node repo
npm/ << npm repo
local/ << default setup location as outlined in the gist
有谁知道这里出了什么问题。
编辑
Bash 历史记录
$ 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
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 [email protected]
info using [email protected]
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! <[email protected]>
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个类似的问题:
另外:您有目录“/home/ash/local/etc/npmrc”吗?
Here is a similar problem:
ALSO: Do you have a directory "/home/ash/local/etc/npmrc"?