user4640064
user4640064

Reputation:

npm ERR! install Couldn't read dependencies on mac

Here:

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

Can you tell me how to solve it?

git clone https://github.com/gaylemcd/ctci.git
cd ctci/javascript
npm install
npm install -g mocha
mocha --recursive

Upvotes: 3

Views: 7403

Answers (1)

Kenan
Kenan

Reputation: 2327

It looks to me like you are running npm install in a directory without a package.json. npm has absolutely no idea what you want it to install unless you either pass it arguments (like npm install express) or run it in a directory with package.json. The documentation on npm install explains all this.

Upvotes: 10

Related Questions