Issue
I am trying to add Geolocation to my ionic app, running these commands:
ionic cordova plugin add cordova-plugin-geolocation
npm install @ionic-native/geolocation
And then trying to run it on my android device (ionic cordova run android
).
However, I'm getting this error message:
An unhandled exception occurred: [BABEL] C:\Users\damie\Documents\Ionic\geoLocation\www\0-es2015.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it.
Can someone please tell me how to resolve this issue?
Solution
I managed to find a solution to this:
- Delete node_modules and package-lock.json
- Add “resolutions”:
{ “@babel/preset-env”: “^7.8.7” }
to package.json
- Run
npm install npm-force-resolutions --save-dev
- Run
npm install
- Run
npx npm-force-resolutions
- Run
npm install again
Then run your app (i.e. ionic cordova run android
), & should work
Answered By - user9847788
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.