【发布时间】:2015-05-25 14:44:03
【问题描述】:
- 我正在努力支持如何破解面试存储库https://github.com/gaylemcd/ctci/tree/master/javascript/lib/data-structures
- 我正在努力应对 JS 职位的面试
- 他们正在使用 mocha 和 chai,所以我正在尝试提交代码 在 JS 中
- 我正在尝试执行以下步骤,但以下步骤失败了
一步,
npm install - 我收到以下错误
- 在尝试
npm install之后我已经安装了Node.js
这里:
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
【问题讨论】:
标签: javascript node.js macos git npm