react start报错 Can't resolve '@babel/runtime/helpers/esm/createSuper'

问题描述

react项目进行npm start后报错如下,无法正常显示页面:

Module not found: Can’t resolve ‘@babel/runtime/helpers/esm/createSuper’ in ‘E:\jianshu\jianshu\node_modules\rc-field-form\es’

查找@babel/runtime/helpers/esm下发现没有createSuper

解决方法

重新安装babel

1
npm install --save-dev @babel/core @babel/cli

根据提示添加createSuper

1
yarn add @babel/runtime/helpers/esm/createSuper

根据提示依次执行以下命令:

1
2
yarn upgrade
yarn install

页面正常显示