InterviewSolution
| 1. |
How will you uninstall or update any dependencies through NPM? |
|
Answer» Node Package Manager (NPM) provides two primary functionalities −
www.npmjs.com hosts thousands of free packages to download and use. The NPM program is installed on your computer when you INSTALL Node.js. There might be a scenario when we are required to either uninstall a dependency or have to update an existing dependency, so please use the FOLLOWING command for uninstalling any dependencies through NPM: C:Nodejs_WorkSpace>npm uninstall <Name of dependency here>Please use the following command for updating any dependencies through NPM C:Nodejs_WorkSpace>npm update <Name of dependency here>To get the old behavior, use npm --depth 9999 update . As of npm@5.0.0 , the npm update will change package.json to SAVE the NEW version as the minimum required dependency. To get the old behavior, use npm update --no-save |
|