Requires Babel “7.0.0-0” but was loaded with “6.26.3”

前端 未结 10 875
深忆病人
深忆病人 2020-12-08 06:16

Keep getting this error no matter what I tried installing (babel wise) as I follow other similar reports. this is the stack trace:

error: bundli         


        
10条回答
  •  一向
    一向 (楼主)
    2020-12-08 07:20

    Test which version you are running with cmd

    babel -V
    

    If it is not verion 7 or higher

    npm uninstall babel-cli -g
    npm uninstall babel-core -g
    

    And

    npm install @babel/cli -g
    npm install @babel/core -g
    

    If you are using Jest run

    npm install babel-core@7.0.0-bridge.0 --save-dev
    

    Uninstall and reinstall @babel/node solves the problem if you do node development.

提交回复
热议问题