Hacker News new | ask | show | jobs
by antiokus314 3653 days ago
I guess I'm a little confused as to the use case here.

I've never been in a scenario where I had a project that

1) required dependencies that weren't installed explicitly

or

2) weren't declared in the package.json

How does this situation even happen?

1 comments

When you create an application or a simple js file which requires node modules to be required, for the first time you need to install all the modules explicitly and individually and also save it to the package.json. This module will save your time and install all the modules required for your js file to run and save it to package.json If there doesnt exist a package.json, it creates it and saves the dependencies there. It works for a folder too which contains n number of js files.