0
$ npm install opn --save
C:\Users\broven\AppData\Roaming\npm
`-- opn@4.0.2
  +-- object-assign@4.1.0
  `-- pinkie-promise@2.0.1
    `-- pinkie@2.0.4

I run npm install in my project dir, but npm won't install package in my project ,even not generate node_modules folder,

Broven
  • 63
  • 7

3 Answers3

0

C:\Users\broven\AppData\Roaming\npm

I dont think this would be your project directory, you wouldn't run a package json there would you?

meda
  • 45,103
  • 14
  • 92
  • 122
  • my project directory is another one :'/d/node/angular2-quickstart' ,I run npm in there, but log is this,why this happen.. – Broven Jul 19 '16 at 02:32
0

Did you run npm init in the root directory of your project before using npm install? npm init will create a package.json file for you.

Thomas Wolfe
  • 638
  • 6
  • 11
  • Ok, I'm not sure why things are not working then. Could you post a picture of your project directory? Also, I would recommend looking through [this](https://github.com/npm/npm/wiki/Troubleshooting) troubleshooting guide. – Thomas Wolfe Jul 20 '16 at 16:04
0

Based on log seems C:\Users\broven\AppData\Roaming\npm is not your project directory. Can you ensure your path and then try installing again.

jerry
  • 745
  • 6
  • 20