Background: the project based on vue-cli3 introduces error reporting on demand
According to the official documents, introduce components as required, as follows:
1. Install: NPM install Babel plugin component – d
2 babel.config.js Modify configuration in
module.exports = {
presets: [["es2015", { modules: false }]],
plugins: [
[
"component",
{
libraryName: "element-ui",
styleLibraryName: "theme-chalk",
},
],
],
};
3. After running, Babel compiles and reports an error:
cannot find module ‘babel-preset-es2015’
4. Query the document and find the following sentence:
this preset is not recommended. If you want to keep it up to date, please use env preset
5. Solution:
1) install NPM install — save dev @ Babel/preset env
2) modify babel.config.js “Es2015” is “@ Babel/preset env”
3)
Official website link reference: https://babel.docschina.org/docs/en/6.26.3/babel-preset-es2015/
Read More:
- Uiautomatiorviewer connect to the machine and click to report unexpected error while observing UI hierarchy
- When react dynamically prunes components by operating arrays, the state of the remaining components is not preserved. Solution to the problem (method of dynamically setting unique key value)
- Using Lombok to compile and report errors
- CentOS uses Yum install to report errors
- Using JSON to report errors
- Using jsoup to parse web pages and report null errors
- Solution of idea using @ Autowired annotation to report errors
- Using jgit to report errors: the solution of algorithm negotiation failure
- Node.js Using port 80 to report errors in Linux
- Running Django manager.py report errors Error:111 connecting to 127.0.0.1:6379.connection refused
- The solution of using Autowired annotation to report errors in IntelliJ idea
- Nailing dd.httpRequest report errors error:12
- New Maven project– pom.xml report errors
- solve java.net.ConnectException : Connection refused:connect report errors
- Linux environment setup – Update https://apt.repos.intel.com report errors
- When I first learned mybatis org.apache.ibatis . binding.BindingException report errors
- File.createNewFile report errors java.io.IOException , resolved
- Vue introduces ecarts, init initializes and reports an error
- WSL 2 needs to update its kernel components
- Clion configuration MingGW report error test cmake run with errors solution