According to this source, it is feasible to install npm packages before creating the package.json file.
After installing nodeJS on my computer, I attempted to run the following command in an empty directory:
npm install jQuery
This resulted in the following error message in the console:
D:\Rasik\reactJs\learnJs
`-- [email protected]
npm WARN enoent ENOENT: no such file or directory, open 'D:\Rasik\reactJs\learnJs\package.json'
npm WARN learnJs No description
npm WARN learnJs No repository field.
npm WARN learnJs No README data
npm WARN learnJs No license field.
I am currently working on an HTML Vanilla JavaScript (JS) project and aiming to utilize npm to obtain the latest packages or JS files. However, I prefer not to execute npm init prior to installing the packages as this project does not fall under the category of a ReactJS application.