react-echarts icon indicating copy to clipboard operation
react-echarts copied to clipboard

缺少babel-runtime导致模块路径import/require错误

Open fanfank opened this issue 9 years ago • 0 comments

我用的是npm 2.14.7版本(官网的Node 4.x LTS附带的) npm install结束后运行程序出现如下错误:

ERROR in ./~/react-echarts/lib/index.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/interop-require-default' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/index.js 3:29-85 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/extends' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 3:15-55 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/get' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 5:11-47 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/inherits' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 7:16-57 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/create-class' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 9:19-64 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/class-call-check' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 11:22-71 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/object-without-properties' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 13:31-89 ERROR in ./~/react-echarts/lib/ECharts.js Module not found: Error: Cannot resolve module 'babel-runtime/helpers/interop-require-default' in /Users/reetsee/tmp/index/frontend/microservice/node_modules/react-echarts/lib @ ./~/react-echarts/lib/ECharts.js 15:29-85

手动安装babel-runtime后恢复正常

fanfank avatar Jul 05 '16 07:07 fanfank