每当我运行程序时,都会出现此错误:
./index.js中的错误
模块构建失败(来自./node_modules/babel-loader/lib/index.js):
错误:插件/预设文件不允许导出对象,只能导出功能。在E:\ ReactJS final \ node_modules \ babel-preset-react \ lib \ index.js
在createDescriptor上(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-descriptors.js:178:11)
在items.map(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-descriptors.js:109:50)
在Array.map()
在createDescriptors上(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-descriptors.js:109:29)
在createPresetDescriptors处(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-descriptors.js:101:10)
在passPerPreset(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-descriptors.js:58:96)
在cachedFunction(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ caching.js:33:19)
在presets.presets(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-descriptors.js:29:84)
在mergeChainOpts(E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-chain.js:320:26)
在E:\ ReactJS final \ node_modules @ babel \ core \ lib \ config \ config-chain.js:283:7
请帮助我解决此错误(我还附加了package.json文件)
{
“ name”:“ reactjs-final”,
“ version”:“ 1.0.0”,
“ description”:“”,
“ main”:“ index.js”,
“脚本”:{
“ it”:“ webpack-dev-server --hot”
},
“ author”:“”,
“许可证”:“ ISC”,
“ devDependencies”:{
“ @ babel / plugin-proposal-object-rest-spread”:“ ^ 7.5.1”,
“ @ babel / preset-env”:“ ^ 7.5.4”,
“ babel-preset-stage-0”:“ ^ 6.24.1”,
“ babel-preset-stage-3”:“ ^ 6.24.1”,
“ webpack”:“ ^ 4.33.0”,
“ webpack-cli”:“ ^ 3.3.3”,
“ webpack-dev-server”:“ ^ 3.7.0”
},
“依赖项”:{
“ @ babel / cli”:“ ^ 7.5.0”,
“ @ babel / core”:“ ^ 7.5.4”,
“ @ deck.gl / core”:“ ^ 7.0.0”,
“ @ deck.gl / mapbox”:“ ^ 7.1.4”,
“ @ fortawesome / fontawesome-free”:“ ^ 5.9.0”,
“ @ mapbox / mapbox-gl-geocoder”:“ ^ 4.4.0”,
“ @ mapbox / mapbox-sdk”:“ ^ 0.6.0”,
“ @ mapbox / react-geocoder”:“ ^ 2.5.0”,
“ axios”:“ ^ 0.19.0”,
“ babel-install”:“ ^ 2.1.0”,
“ babel-loader”:“ ^ 8.0.6”,
“ babel-preset-env”:“ ^ 1.7.0”,
“ babel-preset-react”:“ ^ 6.24.1”,
“反跳”:“ ^ 1.2.0”,
“ deck.gl”:“ ^ 7.1.4”,
“ dotenv”:“ ^ 8.0.0”,
“ formik”:“ ^ 1.5.7”,
“ http-proxy-middleware”:“ ^ 0.19.1”,
“ install-peers”:“ ^ 1.0.3”,
“ mapbox-gl”:“ ^ 0.47.0”,
“ npm-autoinstaller”:“ ^ 1.3.1”,
“ randomcolor”:“ ^ 0.5.4”,
“ raw-loader”:“ ^ 3.0.0”,
“反应”:“ ^ 16.8.6”,
“反应自动完成”:“ ^ 1.8.1”,
“ react-dom”:“ ^ 16.8.6”,
“ react-geocoder-mapbox”:“ ^ 2.5.12”,
“ react-google-recaptcha”:“ ^ 1.0.5”,
“反应头盔”:“ ^ 5.2.1”,
“ react-loading-skeleton”:“ ^ 1.1.2”,
“ react-map-gl”:“ ^ 5.0.3”,
“ react-map-gl-geocoder”:“ ^ 2.0.5”,
“ react-mapbox-gl-geocoder”:“ ^ 1.0.3”,
“反应模式”:“ ^ 3.8.2”,
“ react-redux”:“ ^ 7.1.0”,
“ react-router-dom”:“ ^ 5.0.1”,
“ react-router-ga”:“ ^ 1.2.0”,
“ react-router-hash-link”:“ ^ 1.2.1”,
“反应脚本”:“ ^ 3.0.1”,
“ react-text-loop”:“ ^ 2.0.2”,
“ redux”:“ ^ 4.0.1”,
“ redux-thunk”:“ ^ 2.3.0”,
“ uikit”:“ ^ 3.1.6”
}
}