我不熟悉 Python、NodeJS、NPM 或 Grunt,但我需要安装它,因为我想尝试一下Github项目 https://github.com/raphaelluchini/popcorntime-smarttv.
我从 node.org 下载了 NodeJS 并按照上面的描述安装并测试了它这个网站 http://coolestguidesontheplanet.com/installing-node-js-on-osx-10-10-yosemite/。它似乎有效,因为进入节点并运行console.log
worked.
我尝试使用以下行安装 NPM
sudo npm install npm -g
..正如上面所说国家公共管理网站 http://blog.npmjs.org/post/85484771375/how-to-install-npm。这似乎有效。
按照入门指南的指示进行操作咕噜网站 http://gruntjs.com/getting-started让我更新 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] /cdn-cgi/l/email-protection /usr/local/lib/node_modules/grunt-cli
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
└── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)
指示的第二步github页面 https://github.com/raphaelluchini/popcorntime-smarttv "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 或任何其他程序的经验。我尝试过寻找类似的问题,但我无法真正判断是否有任何问题是相同的以及是否有任何解决方案适用于我的问题。很抱歉,如果这是重复的,我不知道。
但我在这里做错了什么以及我需要做什么来解决这个问题?