Plugin/Preset files are not allowed to export objects
来源:2-1 环境搭建

慕设计1147316
2019-06-22
FAIL test/sum.test.js ● Test suite failed to run Plugin/Preset files are not allowed to export objects, only functions. In C:\Users\Administrator\node_modules\babel-preset-react\lib\index.js at createDescriptor (../node_modules/jest/node_modules/@babel/core/lib/config/config-descriptors.js:178:11) at Array.map (<anonymous>)
网上说是babel版本兼容问题,但不知道具体怎么改才能正常运行?
写回答
1回答
-
慕设计1147316
提问者
2019-06-22
{ "presets": ["env", "@babel/preset-react"] }
自己试着安装@babel/preset-react后.barbelrc改成这样运行成功了
我是新手,虚拟机WIN7 64位,感觉配置好混乱啊
012019-06-24
相似问题