![]() |
The Table of Content Methods to Force Generation1. Using –saveIn this approach we are going to use this flag with npm that will install all dependencies required for your application and save in package.lock.json. Syntax: npm install --save
2. Using –save-devIn this approach we are going to use this flag with npm that will install all dependencies required for your application and save in package.lock.json. Syntax: npm install --save-dev
3. Using installIn this approach all the other flags are deprecated by Node JS we can directly use npm to install dependencies and save in package.lock.json. Syntax: npm install
Example: In this GIF example first we deleted then Package-lock.json then we run the given command to install it. |
Reffered: https://www.geeksforgeeks.org
Node.js |
Related |
---|
![]() |
![]() |
|
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |