Please try running the command with sudo as prefix if you are on MacOs . If on windows then please open the cmd as administrator :
Then please try running the npm install command after taking up backup of everything and replacing the package.json file with that given above .
After it some errors might appear .
for cordova-plugin-file plugin please try out running these commands :
cordova cleancordova plugin add [email protected] --force
cordova plugin save