Could not find plugin proposal-numeric-separator

Could not find plugin proposal-numeric-separator_第1张图片

angular-error.log里的错误是:

[error] Error: [BABEL] E:\mobile\cms-v4\cms-app-v4\www\pages-article-article-module-es2015.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "E:\\mobile\\cms-v4\\cms-app-v4\\node_modules\\@babel\\preset-env\\lib\\index.js")
    at getPlugin (E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\preset-env\lib\index.js:67:11)
    at E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\preset-env\lib\index.js:258:62
    at Array.map ()
    at E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\preset-env\lib\index.js:258:43
    at E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\helper-plugin-utils\lib\index.js:19:12
    at E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\core\lib\config\full.js:179:14
    at Generator.next ()
    at Function. (E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\core\lib\gensync-utils\async.js:26:3)
    at Generator.next ()
    at step (E:\mobile\cms-v4\cms-app-v4\node_modules\gensync\index.js:254:32)
    at evaluateAsync (E:\mobile\cms-v4\cms-app-v4\node_modules\gensync\index.js:284:5)
    at Function.errback (E:\mobile\cms-v4\cms-app-v4\node_modules\gensync\index.js:108:7)
    at errback (E:\mobile\cms-v4\cms-app-v4\node_modules\@babel\core\lib\gensync-utils\async.js:70:18)
    at async (E:\mobile\cms-v4\cms-app-v4\node_modules\gensync\index.js:183:31)
    at onFirstPause (E:\mobile\cms-v4\cms-app-v4\node_modules\gensync\index.js:209:13)
    at Generator.next ()

在网上找了这个办法:

1-Open package.json and add

 "resolutions": {
  "@babel/preset-env": "^7.8.7"
 },

 "dependencies": {..}

2- run npx npm-force-resolutions

3- run npm install

试过,不行,报错:

Could not find plugin proposal-numeric-separator_第2张图片

后来搜到并试第二种办法:

修改 tsconfig.json 的 target value:

将{ "target": "es2015" } 改为 { "target": "es5" }

然后再进行ionic cordova build android

成功。 

你可能感兴趣的:(Could not find plugin proposal-numeric-separator)