Skip to content
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

Could not find plugin "proposal-class-properties". Ensure there is an entry in ./available-plugins.js #12247

Closed
nagthgr8 opened this issue Oct 24, 2020 · 5 comments
Labels
i: question outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@nagthgr8
Copy link

nagthgr8 commented Oct 24, 2020

Bug Report

Current behavior
The ng build in Angular 8 & 9 produces below error
[BABEL] C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\dist\main-es2015.js: Could not find plugin "proposal-class-properties". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\@babel\preset-env\lib\index.js")
Error: [BABEL] C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\dist\main-es2015.js: Could not find plugin "proposal-class-properties". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\@babel\preset-env\lib\index.js")
at getPlugin (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\preset-env\lib\index.js:67:11)
at C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\preset-env\lib\index.js:258:62
at Array.map ()
at C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\preset-env\lib\index.js:258:43
at C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\helper-plugin-utils\lib\index.js:19:12
at C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\core\lib\config\full.js:179:14
at Generator.next ()
at Function. (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\core\lib\gensync-utils\async.js:26:3)
at Generator.next ()
at step (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\gensync\index.js:254:32)
at evaluateAsync (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\gensync\index.js:284:5)
at Function.errback (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\gensync\index.js:108:7)
at errback (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules@babel\core\lib\gensync-utils\async.js:70:18)
at async (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\gensync\index.js:183:31)
at onFirstPause (C:\Users\NagaRam\source\repos\MyyPub.Web\ClientApp\node_modules\gensync\index.js:209:13)
at Generator.next ()

Expected behavior
The build should be complete without errors

Environment
npx: installed 1 in 5.113s

System:
OS: Windows 10 10.0.17134
Binaries:
Node: 12.16.3 - C:\Program Files\nodejs\node.EXE
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@babel/plugin-proposal-class-properties: ^7.12.1 => 7.12.1

  • Babel version(s): ^7.12.1 => 7.12.1
  • Node/npm version: Node 12/npm 6
  • OS: [e.g. Windows 10
  • Monorepo: no
  • How you are using Babel: CLI

Possible Solution

Additional context

@babel-bot
Copy link
Collaborator

Hey @nagthgr8! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@nagthgr8
Copy link
Author

This is a straight bug & a blocker should have fixed by now instead of workarounds, the following steps fixed the issue but there should be a much efficient way
add "resolutions": { "@babel/preset-env": "7.5.5" }, in package.json。

run npx npm-force-resolutions

run npm install or yarn
ref: https://stackoverflow.com/questions/62585989/could-not-find-plugin-proposal-class-properties-how-to-resolve-this

@nicolo-ribaudo
Copy link
Member

This has been fixed in @babel/preset-env@7.8.7 - #11201

@nagthgr8
Copy link
Author

The issue is actually resolved by adding npm i @babel/compat-data@7.8.0

@FelipeBeleno
Copy link

El problema se resuelve realmente agregando npm i @ babel / compat-data @ 7.8.0

Funciono eres un crack bro.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: question outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

5 participants