如何修复Could not find plugin "proposal-numeric-separator",当我尝试构建我的 React 应用程序时出现此错误,我尚未弹出该应用程序:
Could not find plugin "proposal-numeric-separator"
./src/index.js Error: [BABEL] /home/pc/Downloads/project/src/index.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/home/pc/Downloads/project/node_modules/babel-preset-react-app/index.js$0") at Array.map (<anonymous>) at Generator.next (<anonymous>) at Generator.next (<anonymous>) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我尝试下载 Babel 和依赖项 Proposal Numeric Separator、删除 Node 模块、清理 Yarn 缓存;但都不起作用。
我正在使用 Yarn 1.22.4 和 Node 13.11.0,但我也尝试过使用 NPM 6.13.7。
以下步骤有效:
package.json
"resolutions": { "@babel/preset-env": "7.5.5" },
$ npx npm-force-resolutions
$ npm install # or $ yarn
$ yarn build
看看这个 Github 问题