npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\Nuwanst\package.json’

Have you created a package.json file? Maybe run this command first again.

C:\Users\Nuwanst\Documents\NodeJS\>npm init

It creates a package.json file in your folder.

Then run,

C:\Users\Nuwanst\Documents\NodeJS\>npm install --save

The --save ensures your module is saved as a dependency in your package.json file.

Let me know if this works.

Leave a Comment