npm install
npm install
下面:
npm ERR! install **Couldn't read dependencies**
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! path /Users/Raj/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! package.json ENOENT, open '/Users/Raj/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Raj/Desktop/ctci/npm-debug.log
你能告诉我如何解决它吗?
git clone https://github.com/gaylemcd/ctci.git
cd ctci/javascript
npm install
npm install -g mocha
mocha --recursive
答案 0 :(得分:9)
我认为您在没有npm install
的目录中运行package.json
。 npm
绝对不知道您希望它安装什么,除非您传递参数(如npm install express
)或在package.json
的目录中运行它。 documentation on npm install
解释了所有这些。