Error message after Vue project NPM run dev: prompt “ exports is not defined”。
This problem is caused by the problem of the configuration file. Babelrc of balbel:
{ "presets": [ ["env", { "modules": false }], "stage-2" ], "plugins": ["transform-runtime"], "comments": false, "env": { "test": { "presets": ["env", "stage-2"], "plugins": [ "istanbul" ] } } }
Remove { ” Modules “: false} where {” modules “: false} prevents Babel from module conversion. See the description of modules configuration for details. Therefore, change modules to the default setting or delete the configuration
Similar Posts:
- Vue compatible ie error reporting solution
- [Solved] Vue/cli install element error: Error: cannot find module ‘Babel plugin component’
- vue ‘Couldn’t find preset “es2015” relative to directory’
- [Two Solutions] Syntax error: unexpected token import
- [Solved] Node.js runs ES6 default import file error: import m1 from’./m1.js’ ^^ SyntaxError: Unexpected identifier
- [Solved] TypeError: Property value expected type of string but got null
- [Solved] react Project Error: Support for the experimental syntax ‘decorators-legacy’ isn’t currently enabled
- React uses antd to import error messages on demand
- [Solved] Mobx error: Support for the experimental syntax ‘decorators-legacy’ isn’t currently enab
- npm run build : No such file or directory [How to Solve]