Could not find plugin “proposal-numeric-separator”

后端 未结 18 1137
情深已故
情深已故 2020-12-08 00:04

How to fix Could not find plugin \"proposal-numeric-separator\", I get this error when I try to build my React application, I have not ejected the application y

18条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 00:25

    Its just a 4 step process.

    Reason: This happens because of a package missing in babel. This will happen even if you create angular app using ng new command.

    Solution

    1. Install plugin-proposal-numeric-separator using the following code in terminal.

      npm install --save @babel/plugin-proposal-numeric-separator
      
    2. Once it is done navigate to the file as shown below.

      node_modules > @babel > preset-env > available-plugins.js

    3. In available-plugins.js below exports.default = void 0; copy and paste the following code.

      var _pluginProposalNumericSeparator = _interopRequireDefault(require("@babel/plugin-proposal-numeric-separator"));
      
    4. In available-plugins.js within var _default object declaration copy and paste the following code.

      "proposal-numeric-separator": _pluginProposalNumericSeparator.default,
      

    And it is done.

提交回复
热议问题