Assume I install project packages with npm install that looks into package.json for modules to be installed. After a while I see that I don\'t need
I have added few lines inside package.json:
"scripts": {
...
"clean": "rmdir /s /q node_modules",
"reinstall": "npm run clean && npm install",
"rebuild": "npm run clean && npm install && rmdir /s /q dist && npm run build --prod",
...
}
If you want to clean only you can use this rimraf node_modules or rm -rf node_modules.
It works fine