I have some module in my node_module folder but because I am amateur in nodejs
, when I wanted to install theme, I forgot to use --save
with npm i
Its simple. Edit the package.json file and add the following for development dependencies:
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"broccoli-merge-trees": "^0.2.1",
"broccoli-svg-sprite": "^1.0.3",
......
}
To get a list of package names and version numbers, you may look at node_modules/module folder/package.json for each of the modules to pick up the official package name and version. It will be of the form:
{
"name": "<>",
"version": "2.1.0",
"description": "broccoli asset revisions (fingerprint)",
....
}
just copy the name and version information from above into devDependencies into your project's package.json and you should be good to go.
Also have a look here Is there a way to automatically build the package.json file for Node.js projects
and here: https://docs.npmjs.com/files/package.json