【发布时间】:2019-07-24 22:16:55
【问题描述】:
这是在运行npm start 时抛出的
/Users/Gabe/esports-calendar/node_modules/@babel/core/lib/config/config-descriptors.js:178
throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`);
^
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/Gabe/esports-calendar/node_modules/babel-preset-es2015-ie/index.js
【问题讨论】:
-
@Peter 这就是我困惑的地方,我不知道主机是在哪里导入的,甚至不知道它是什么。
-
@Peter 更新以添加 event.js 的其余部分——这是检查时显示的错误:puu.sh/DYR0P/e02013e65f.png
-
@Peter Done,但问题仍然存在。但是,我收到了 Autoprefixed 警告,这可能是问题的根源吗?:
Replace Autoprefixer browsers option to Browserslist config. Use browserslist key in package.json or .browserslistrc file. Using browsers option cause some error. Browserslist config can be used for Babel, Autoprefixer, postcss-normalize and other tools. If you really need to use option, rename it to overrideBrowserslist. Learn more at: https://github.com/browserslist/browserslist#readme https://twitter.com/browserslist -
@Peter Razzle 是最新的 3.0.0 版
-
好吧,当你“升级到 babel 7”时,你到底做了什么?