[英]npm unable to install dependencies
I'm trying to install some npm modules and all goes fine until I try to install the dependencies of the installed modules. 我正在尝试安装一些npm模块,并且一切正常,直到尝试安装已安装模块的依赖项为止。 npm shows this log: npm显示此日志:
$ sudo npm install -g
npm ERR! addLocal Could not install .
npm ERR! Error: ENOENT, open 'package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/roemerbakker
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.21
npm ERR! path package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/roemerbakker/npm-debug.log
npm ERR! not ok code 0
$
Also tried the command without -g but it doesn't work either. 还尝试了不带-g的命令,但是它也不起作用。
There is no need for this. 不需要这个。 When you install a npm package with npm install <package name>
(globally or locally), it already installs all of its dependencies on its own. 使用npm install <package name>
(全局或本地)安装npm程序包时,它已经自行安装了所有依赖项。
You only need the npm install
command when you checked out an Application with a package.json
-File to install the APPLICATIONS Dependencies. 当您签出带有package.json
-File的应用程序以安装APPLICATIONS Dependencies时,仅需要npm install
命令。
如果要升级所有全局软件包,则应使用:npm update -g
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.