How to fix could not find plugin proposal-numeric-separator in angular app

How to fix could not find plugin proposal-numeric-separator in angular app

New version of babel comes with new bug that give error below when users try to build their applications:

Could not find plugin “proposal-numeric-separator”

Even when you install proposal-numeric-separator dependency the error won't go away!

Today I will show two ways to fix this issue:

Solution 1

  1. delete node_modules and package-lock.json
  2. add "resolutions": { "@babel/preset-env": "^7.8.7" } to package.json
  3. nginstall npm-force-resolutions --save-dev
  4. npm install
  5. npx npm-force-resolutions
  6. npm install again
  7. ng build

Solution 2

Open package.json and add "@babel/compat-data": "7.8.0", to dependencies and run npm install.

Note: current version of "@babel/compat-data" is 9.x.x here we are downgrading the version.

- Last updated 1 year ago

Be the first to leave a comment.

You must login to leave a comment