我不熟悉Python,NodeJS,NPM或Grunt,但是我需要安裝它,因爲我想試試Github project。安裝nodejs npm和grunt給出了錯誤
我從node.org下載了NodeJS,並按照this website上的描述安裝並測試了它。它似乎工作,因爲進入節點和運行console.log
工作。
我試着用下面的行
sudo npm install npm -g
..as在NPM website說安裝NPM。這似乎工作。
繼從Grunt website入門指南讓我更新NPM
npm update -g npm
和安裝CLI
npm install -g grunt-cli
這導致以下消息:
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
[email protected] /usr/local/lib/node_modules/grunt-cli
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
方向的第二步「run npm install
」原來是有問題的。導致這些錯誤:
MacBook-Pro-van-Paul:~ Paul$ sudo 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.10.33
npm ERR! npm v2.1.10
npm ERR! path /Users/Paul/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR! package.json ENOENT, open '/Users/Paul/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/Paul/npm-debug.log
就像我說的,我沒有使用Python或任何其他程序的經驗。我試着尋找類似的問題,但我無法確定是否有任何問題是相同的,如果有任何解決方案可能適用於我的。非常抱歉,如果這是重複的,我不知道。
但我在這裏做錯了什麼,我需要做什麼來解決這個問題?