1

I've looked through the different articles here, but I'm not finding out the answer I need, or don't understand necessarily what has been explained in other posts.

I downloaded node.js got my github up and have cloned the phonecat site, that part works fine. I can even check npm/node versions through cmd, but whenever I install using either "npm install" or "npm install -g" "Couldn't read depndencies" couldn't find package.json" has a long list of errors:

http://tinypic.com/1r54rjf4

I have tried caching, updating, restarting, uninstalling, reinstalling, giving permissions to fully allow windows system32 for commands. I have been reading for a few hours, and I am just at a complete loss here. Any help would be greatly appreciated!

1
  • 1
    try npm -v (npm with the verbose flag) that should let you know if npm is actually working at all...then @Brennan is correct and you need to setup a project or dl one. Commented May 4, 2015 at 23:29

3 Answers 3

1

When you don't specify a module to download, npm will look for a package.json. It's not finding one, which is why you're seeing all kinds of errors.

Is there a project you're working on? If you want to start a new one you can run npm init. If there's an existing one that has a package.json, you can navigate to that directory in your terminal and then npm install should work.

Sign up to request clarification or add additional context in comments.

5 Comments

I'm trying to recreate the google phonecat with angularJS. but I didn't find a package.json file in any of the directories of the master npm folder. docs.angularjs.org/tutorial/step_00 this is the site I'm using to build it. The next question would be is do I need to do a npm init to create this? Because it already exists and I have cloned it successfully. from github. Its hard to tell because what the docs says to do is run the npm install and then doc starts teaching and putting the code together right underneath in the next section.
Looks like there is a package.json. From the screenshots you linked earlier it looked like you were in the home directory. Make sure you run npm install from the project directory. So to be clear, you shouldn't need to use npm init.
Thank you for your help. It worked! It ran, I'm not sure if it worked, the attached pics are of the capturing of what the install did. There weren't any "Complete installation" or "installation successful" . In the 1st image , I'm a little concerned because i do see a yellow highlight with "WARN" on it. I'm not sure what the end result is supposed to look like because its my first time doing this. i57.tinypic.com/ae7h1v.jpg i60.tinypic.com/16knurq.jpg
Well, it looks like it worked, but unfortunately I wasn't clear enough. Looks like you've installed the node modules that the npm tool depends on. I should have been more clear, you need to run npm install from the google phonecat directory. So this is wherever you cloned the repo.
Did you have any luck @RichardBretton?
0

I didn't. I'm still wrestling with it. I'm not sure what to do about it either. I had one of my friends come over that's familiar with node and he couldn't figure it out. It must be a permissions issue somewhere on the computer. I can't figure out what else it could be.

Comments

0

i think you need to run your VSCode or any other program in Administrator Mode.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.