Cannot find module '@babel/core'

后端 未结 12 571
再見小時候
再見小時候 2021-01-30 16:01

I am following along with this webpack4/react tutorial:

https://www.youtube.com/watch?v=deyxI-6C2u4

I have followed it exactly up until the part where he runs np

12条回答
  •  时光说笑
    2021-01-30 16:12

    Go in by running on Windows, %USERPROFILE%\.quokka

    The ~/.quokka configuration is limited to the config.json file and any packages that exist in ~/quokka/node_modules.

    Put the following into config.js,

    {
      "pro":true, 
      "babel": {
        "presets": ["@babel/preset-env", " @babel/preset-react"],
        "plugins": [
          ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
          ["@babel/plugin-proposal-decorators", { "legacy": true }],
          ["@babel/plugin-proposal-class-properties", { "loose": true }]
        ]
      }
    }
    

提交回复
热议问题