Reputation: 26598
I already installed an npm library. When installing I forgot to add the "-save" flag. How do I add the library to the package.json dependencies?
Upvotes: 0
Views: 113
Reputation: 2761
You can run the command:
npm install react --save
or
npm install react --save-dev
Upvotes: 0
Reputation: 44
you can manually add the specific dependency as below:-
example(package.json):-
"react": "^15.6.1"
if you don't know the version of the library you're going to install, just do the install again on project path as below:
npm i react -S
This will add stable version automatically to package.json. Hope this helps.
Upvotes: 1