6

Hey I've been trying to install "ws" module but when I run npm install ws it gives following error,
npm WARN enoent ENOENT:<Folder name> no such file or directory, open 'G:\Dead Simple\package.json' Well I searched for solution , everybody answered it as you should have package.json file in your project directory but being a beginner I really don't what to write in that file.How should I resolve it ?

It gives me exactly this output ...
npm WARN enoent ENOENT: no such file or directory, open 'G:\Dead Simple\package.json' npm WARN Dead Simple No description npm WARN Dead Simple No repository field. npm WARN Dead Simple No README data npm WARN Dead Simple No license field.

omjego
  • 373
  • 2
  • 5
  • 15

1 Answers1

10

You don't need to write anything. At the beginning of your project when you:

 npm init

a package.json will be created, listing references to packages you have installed. Installing extra packages add them to your node_modules directory, and adds a reference to your package.json.

Brian
  • 924
  • 13
  • 22
  • Hey I tried now it popped up following message. `G:\Sem 6\Project JS\js\Dead Simple>npm install ws --save dead_simple@1.0.0 G:\Sem 6\Project JS\js\Dead Simple `-- ws@2.0.3 `-- ultron@1.1.0 npm WARN dead_simple@1.0.0 No description npm WARN dead_simple@1.0.0 No repository field.` – omjego Feb 08 '17 at 15:01
  • please confirm you have package.json in the root of your project. – Brian Feb 08 '17 at 15:31