My App was running fine till then I updated to latest cordova CLI version after I update what I noticed was one of feature not working at runtime, while I debugged through chrome://inspect I noticed a message “plugin not installed…” what must have happened is while I uninstalled a plugin through ionic cordova plugin remove I must have missed extra step which is npm uninstall… hence so the BUILD is through but the App failed at runtime. This disaster made me to think of making a complete cleanup & then build the App again as I thought the patch up may work but may lead to some inconsistency or other. I have followed below steps
- uninstalled nodejs (from windows programs)
- physically deleted the nodejs folder from c:\ProgramFiles
- physically deleted npm folder under C:\Users\AppData\Roaming\
- installed again latest nodejs & npm using nvm
- under the project root I deleted a mighty node_modules folder
- I ran check-npm (after installing this tool from the fresh npm)
- Followed the discrepancies pointed by check-npm and uninstalled all the packages which the tool has found as unused, knowing this as blind step as my intention is to do a full cleanup, even if I happen to uninstall any needed packages I thought could install them while the BUILD fails, as it is far better let the BUILD fail & fix issues rather BUILD success and find runtime issues in the App.
Now the dilemma begins
a) when I physically deleted node_modules why is the npm uninstall taking such a long time to uninstall which is already deleted
b) some npm uninstall commands not removing entries from package.json which is very much worrying if package.json is not updated then ball is back into the court
Can anyone please help what is the best way to make a clean build . I am new to this HYBRID App development, please excuse my ignorance.
cant show ionic info at this stage because some dependencies needed by this were uninstalled as pointed by npm-check, I know this will happen, the intent is to make a clean build rather patching & let the App fail at run time. All I want to is generate (manually or automated) the much needed clean package.json as needed by my project. if I run npm install now I know it will reintall and also some my project does not need