【发布时间】:2015-02-01 13:07:24
【问题描述】:
我不熟悉 Python、NodeJS、NPM 或 Grunt,但我需要安装它,因为我想试试 Github project。
我从 node.org 下载了 NodeJS,并按照this website 中的描述进行了安装和测试。它似乎有效,因为进入节点并运行 console.log 有效。
我尝试使用以下行安装 NPM
sudo npm install npm -g
..正如NPM website 所说。这似乎奏效了。
按照 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
grunt-cli@0.1.13 /usr/local/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.5)
└── findup-sync@0.1.3 (lodash@2.4.1, glob@3.2.11)
github page“运行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 或任何其他程序的经验。我曾尝试寻找类似的问题,但我无法确定是否有任何问题相同,以及是否有任何解决方案可能对我有用。很抱歉,如果这是重复的,我不知道。
但是我在这里做错了什么,我需要做些什么来解决这个问题?
【问题讨论】:
标签: python node.js macos gruntjs npm