ionic4 执行ionic cordova run android 时报错Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it.

解决方法:
1. 在package.json中加上:
"resolutions": {
  "@babel/preset-env": "^7.8.7"
},
2. 执行 npx npm-force-resolutions
3.执行 npm install
 
我亲自试了,确实解决了,但是之后又安了一个vconsole,再次执行ionic cordova run android 又报错,于是又重复了上面2,3两步,然后又正常了。我还不太理解这个原理。这是从网上找到的解决方法。https://stackoverflow.com/questions/60787334/ionic-android-build-fails-with-could-not-find-plugin-proposal-numeric-separator?answertab=active#tab-top

 

posted @ 2020-04-01 13:36  johnjackson  阅读(1522)  评论(0编辑  收藏  举报