Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is npm WARN enoent ENOENT: while installing "ws" module in node.js

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.

like image 881
omjego Avatar asked Feb 07 '17 14:02

omjego


1 Answers

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.

like image 88
Brian Avatar answered Nov 15 '22 03:11

Brian