ERROR in Cannot find module 'babel-core'. using react.js, webpack, and express server

前端 未结 5 1210
时光取名叫无心
时光取名叫无心 2020-12-22 22:37

Whenever I run webpack in the terminal I get:

Hash: efea76b1048c3a97b963
Version: webpack 1.12.13
Time: 33ms
    + 1 hidden modules

ERROR in Ca         


        
5条回答
  •  生来不讨喜
    2020-12-22 23:03

    Adding to @Chetan's answer on this thread:

    I ran into this issue today while following through Dr. Axel Rauschmayer's book here. Per book, babel-loader should download babel-core as well. However this is not the case when I tried it out. I think this relates to @theJian's answer.

    Since the original package.json already lists babel-loader as dependency, running the following command resolved the error.

    npm install babel-core --save-dev
    

提交回复
热议问题