I'm struggling with cordova and npm clis errors. I know this is a very common error: I get this error on daily basis on different project and platform.
I noticed my Ionic1 application, which use crosswalk-webview, works with Android 6 but crash with Android 7 (it seems a known bug). Those are the steps I tried:
I tried to remove and re-add crosswalk-webview:
cordova plugin rm cordova-plugin-crosswalk-webview
cordova plugin add cordova-plugin-crosswalk-webview
I get an npm error on adding the plugin:npm verb stack Error: EPERM: operation not permitted, rename...
the build fails:
ionic cordova build --release android
with the same error:Error: EPERM: operation..
since several plugin are outdated, I thought to remove and re-add the whole platform android
cordova platform rm android
Almost 1 hour later the command is still stuck so I terminated it.
Now if I try to add android as platform I get an error:
Error: EPERM: operation not permitted, rename...
I tried to downgrade npm, I tried the following 5.6.0, 5.5.1, 5.4.2, 5.3.0, 5.0.0, 4.6.0 release. I reinstalled node, cordova, ionic, I cleared npm cache. I do not solved. It's clearly an NPM issue, maybe here somewhere knows how to solve..
At the current state, if I try:
cordova platform add android
I get:
Error: EPERM: operation not permitted, rename 'C:\nodejs\myapp\node_modules\.staging\cordova-android-78ae6d2a\node_modules\cordova-registry-mapper'
The "funny" part if I simply rerun cordova platform add android
multiple times I get the error "EPERM: operation not permitted" on different modules.
I'm out of ideas.