Reputation: 3212
I'm not familiar with Python, NodeJS, NPM or Grunt, but I needed to install it because I want to try out a Github project.
I downloaded NodeJS from node.org and installed and tested it as described on this website. It seems to work because entering node and running a console.log
worked.
I tried installing NPM with the following line
sudo npm install npm -g
..as said on the NPM website. This seemed to work.
Following directions from the Getting Started guide from the Grunt website had me updating NPM
npm update -g npm
and installing the CLI
npm install -g grunt-cli
which resulting in the following message:
/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])
The second step of the directions on the github page "run npm install
" turned out to be problematic. That results in these errors:
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
Like I said, I have no experience whatsoever with using Python or any of the other programs. I've tried searching for a similar problem, but I can't really tell if any of the problems are the same and if any solution might work for mine. So sorry if this is duplicate, I am not aware.
But what am I doing wrong here and what do I need to do to resolve this?
Upvotes: 0
Views: 1106
Reputation: 377
Try this.
Create new blank folder for your project.Go to your project folder and create manually npm folder (don't use command line).
Then try again create new project.
Hope this help.
Upvotes: 0
Reputation: 14219
Your problem has nothing to do with Python, nor does the project you're trying to work with.
npm install
will look for a local package.json
file and install dependencies from the list supplied in there. After you clone the project you mentioned, make sure you cd
to the location of package.json
and try npm install
again.
Upvotes: 1