0

In command line, I have cd'd to my projects folder that contains package.json and I am trying to run an npm install. This is the error I am getting.

C:\Users\kwoolley\Documents\Code\PFCU\src>npm install
C:\Users\kwoolley
+-- bower@1.7.7
`-- grunt@0.4.5

npm WARN enoent ENOENT, open 'C:\Users\kwoolley\package.json'
npm WARN kwoolley No description
npm WARN kwoolley No repository field.
npm WARN kwoolley No README data
npm WARN kwoolley No license field.

Can y'all think of any reason why it's cutting the path off early at my name?

Kyle Woolley
  • 763
  • 1
  • 6
  • 9

1 Answers1

1

This is actually not an error but a warning message.

Make sure your current directory has a package.json file. If not, try running:

npm init

It then will open a CLI to write your package.json preferences. Just answer the questions and a package.json file will be created.

Warnings like no description, repository, README, license files would be removed next time you run another install by just answering the npm init questions or filling manually the package.json with the following:

{
  "name": "your_app_name",
  "version": "1.0.0",
  "description": "something descriptive",
  "repository": "kylewoolley/your_app_name",
  "license": "MIT"
  "main": "index.js",
  "dependencies": {
    "bower": "^1.7.7",
    "grunt": "^0.4.5",
}
Cezar Augusto
  • 8,794
  • 5
  • 31
  • 36
  • That's the issue though, that directory contains a package.json with all my dependencies, but npm is not recognizing that. – Kyle Woolley May 26 '16 at 14:04
  • I see. So your package.json is stored inside C:\Users\kwoolley\Documents\Code\PFCU\src and suddenly something redirects you to C:\Users\kwoolley. Is that correct? – Cezar Augusto May 27 '16 at 18:43
  • That is correct, I have soled the issue, but it's weird and I don't understand why. That particular package.json had a capital "P" as soon as I renamed it with lowercase it worked fine – Kyle Woolley May 28 '16 at 15:27