Nuxt module build failed error report

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.

Similar Posts: