Problem, in the process of nuxt development, run NPM run dev to report an error directly. The error information is as follows
Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions.
Causes and Solutions
Reason: This exception indicates a version conflict in babel, a babel dependency package is not compatible, there is both babel version 7.0 and babel version 6.0 in the package.json dependency package. The two versions are obviously incompatible, so we can upgrade all of them to babel 7.0. Solution: Upgrade to babel 7.0 with npm install [email protected] and the version conflict will be solved.
- webpack4 Cannot find module ‘@babel/core’ [Solved]
- [Solved] NPM Run Project Error: Cannot find module ‘@babel/compat-data/corejs3-shipped-proposals’
- vue ‘Couldn’t find preset “es2015” relative to directory’
- Cannot find module ‘@babel/core’ [How to Solve]
- [Solved] Vue installation Babel dependency error
- Error in xxx.js from uglifyjs after elementui upgrade [How to Solve]
- [Solved] react Project Error: Support for the experimental syntax ‘decorators-legacy’ isn’t currently enabled
- [Two Solutions] Syntax error: unexpected token import
- [Solved] app crashed – waiting for file changes before starting…
- [Solved] MODULE BUILD FAILED: ERROR: COULDN’T FIND PRESET “ES2015” RELATIVE TO DIRECTORY