我正在从事Vue项目。到目前为止,它为我工作。安装一些软件包后,它将无法使用。
错误就像:
ERROR Error: Using removed Babel 5 option: .modules - Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules
Error: Using removed Babel 5 option: .modules - Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules
at throwUnknownError (E:\booking_room\node_modules\@babel\core\lib\config\validation\options.js:121:11)
at Object.keys.forEach.key (E:\booking_room\node_modules\@babel\core\lib\config\validation\options.js:108:5)
at Array.forEach (<anonymous>)
at validateNested
(E:\booking_room\node_modules\@babel\core\lib\config\validation\options.js:84:21)
at validate
(E:\booking_room\node_modules\@babel\core\lib\config\validation\options.js:75:10)
at file
(E:\booking_room\node_modules\@babel\core\lib\config\config-chain.js:169:34)
at cachedFunction
(E:\booking_room\node_modules\@babel\core\lib\config\caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync
(E:\booking_room\node_modules\gensync\index.js:244:28)
at syn
(E:\booking_room\node_modules\gensync\index.js:84:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASSASSIN\AppData\Roaming\npm-cache\_logs\2020-05-20T13_19_18_381Z-debug.log
babel.config.js:
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
modules: ['bootstrap-vue/nuxt'],
bootstrapVue: {
bootstrapCSS: false,
bootstrapVueCSS: false
}
}
我不确定是什么问题。请任何建议。
我找到了解决方案。
因为我使用modules
删除了Babel 5。
所以我替换了plugins
而不是modules
。
对我有用。