Skip to content

Prod build failing for angular cli version 8.3.0-8.3.25 Could not find plugin "proposal-numeric-separator" #17263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 15 tasks
s-tyler-smith opened this issue Mar 20, 2020 · 3 comments

Comments

@s-tyler-smith
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

@angular/[email protected]

Description

A clear and concise description of the problem...

When running ng build --prod there is an error when generating the es5 bundle:

🔬 Minimal Reproduction

npm install @angular/cli@8
ng new repro-app
cd repro-app
ng build --prod
see error

🔥 Exception or Error




An unhandled exception occurred: [BABEL] /client-apps/repro-app/dist/repro-app/main-es2015.6786a47696d7751389b0.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/client-apps/repro-app/node_modules/@babel/preset-env/lib/index.js")
See "/private/var/folders/w8/2mcdmr7113g7_r0p0jp_cbs1j0_jjp/T/ng-ndBWC7/angular-errors.log" for further details.

where "/private/var/folders/w8/2mcdmr7113g7_r0p0jp_cbs1j0_jjp/T/ng-ndBWC7/angular-errors.log" is

Error: [BABEL] /client-apps/repro-app/dist/repro-app/main-es2015.6786a47696d7751389b0.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/client-apps/repro-app/node_modules/@babel/preset-env/lib/index.js")
    at getPlugin (/client-apps/repro-app/node_modules/@babel/preset-env/lib/index.js:67:11)
    at Array.from.map.pluginName (/client-apps/repro-app/node_modules/@babel/preset-env/lib/index.js:258:62)
    at Array.map (<anonymous>)
    at _default (/client-apps/repro-app/node_modules/@babel/preset-env/lib/index.js:258:43)
    at /client-apps/repro-app/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at /client-apps/repro-app/node_modules/@babel/core/lib/config/full.js:179:14
    at Generator.next (<anonymous>)
    at Function.<anonymous> (/client-apps/repro-app/node_modules/@babel/core/lib/gensync-utils/async.js:26:3)
    at Generator.next (<anonymous>)
    at step (/client-apps/repro-app/node_modules/gensync/index.js:254:32)
    at evaluateAsync (/client-apps/repro-app/node_modules/gensync/index.js:284:5)
    at Function.errback (/client-apps/repro-app/node_modules/gensync/index.js:108:7)
    at errback (/client-apps/repro-app/node_modules/@babel/core/lib/gensync-utils/async.js:70:18)
    at async (/client-apps/repro-app/node_modules/gensync/index.js:183:31)
    at onFirstPause (/client-apps/repro-app/node_modules/gensync/index.js:209:13)

🌍 Your Environment





     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.3.25
Node: 10.17.0
OS: darwin x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.25
@angular-devkit/build-angular     0.803.25
@angular-devkit/build-optimizer   0.803.25
@angular-devkit/build-webpack     0.803.25
@angular-devkit/core              8.3.25
@angular-devkit/schematics        8.3.25
@angular/cli                      8.3.25
@ngtools/webpack                  8.3.25
@schematics/angular               8.3.25
@schematics/update                0.803.25
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2

Anything else relevant?

This issue seems to be replicable with the auto-generated angular project. If it helps i included the router and used scss during the cli options phase.

I have also tried with node 12.13.1. Same results

I've tried installing each angular/cli version from 8.2.0-8.3.25, last one that worked was 8.2.2. 8.3.0 is when the build converted to using the "Generating ES5 bundles for differential loading.." stage instead a separate build.

Seems to be something about the @babel/present-env.

@clydin
Copy link
Member

clydin commented Mar 21, 2020

Duplicate of #17262

@clydin clydin marked this as a duplicate of #17262 Mar 21, 2020
@clydin clydin closed this as completed Mar 21, 2020
@hanoj-budime
Copy link

hanoj-budime commented Apr 4, 2020

worked for me

https://stackoverflow.com/questions/60787334/ionic-android-build-fails-with-could-not-find-plugin-proposal-numeric-separator

This is how i fixed the exact same exception :

1-Open package.json and add

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

 "dependencies": {..}

2- run npx npm-force-resolutions

3- run npm install

Now you're good to go..

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants