Showing posts with label npm npx npm install. Show all posts
Showing posts with label npm npx npm install. Show all posts

Saturday, September 2, 2023

Re install NPM Packages

Reinstall all NPM Packages

 Remove modules under node_modules on Linux or Mac OS 
```sh
rm -rf node_modules && npm install
```

 Remove modules under node_modules on Windows 
```sh
del /s /q node_modules && npm install
```

 Clean  modules from cache , rebuild  and install packages 
```sh 
npm cache clean --force
npm rebuild
npm install

```
 The npm audit fix command will install any packages that are missing in node_modules but it’s present in package.json 

```sh
 npm audit fix
```

 npm update will update any packages that are present in the project.

```sh
npm update

#so we can run this to reinstall any packages that are missing.

```