In vscode, NPM run a vue2.X’s project directly threw an inexplicable error:
TypeError: Failed to load plugin 'vue' declared in '.eslintrc.js': createRequire is not a function
The general error description is as follows:
ERROR Failed to compile with 1 error 16:42:37 Syntax Error: TypeError: Failed to load plugin 'vue' declared in '.eslintrc.js': createRequire is not a function Referenced from: D:\codeSource\myProject\ldsz-cloud\ui-ldsz-adm\.eslintrc.js at _normalizeObjectConfigDataBody.next (<anonymous>) at _normalizeObjectConfigData.next (<anonymous>) You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.
How to Solve:
-
- 1. For VSCode, you can delete the eslint extension directly
-
- 2. Upgrade the node version to the latest or keep it consistent with the node version of your colleagues
Read More:
- [Solved] Vue2.0 Error: Syntax Error: TypeError: eslint.CLIEngine is not a constructor
- Error: Cannot find module ‘./application‘ [How to Solve]
- [Solved] npm Error: Class extends value undefined is not a constructor or null
- [Solved] Vue 3 Script Setup ESLint Error: ‘defineProps‘ is not defined
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- [Solved] Failed to load config “react-app“ to extend from.
- [Solved] Vue eslint Error: Component name “*****“ should always be multi-word
- [Solved] node-xlsx Write excel Error: TypeError: n.indexOf is not a function
- vue.config.js build Package UglifyJsPlugin to clear console and print console.log Error: `warnings` is not a supported option
- Node.js Error: Error: Cannot find module ‘express‘ [How to Solve]
- [Solved] Vue Error: Parsing error: No Babel config file detected for /Users/Usename/xxx…
- [Solved] Errors: 1 http://eslint.org/docs/rules/quotes…elementUI Import Error
- [Solved] Syntax Error: Error: No ESLint configuration found & TypeError: eslint.CLIEngine is not a constructor
- [Solved] Syntax Error: TypeError: this.getOptions is not a function
- Vue Install less Error: While resolving: [email protected]
- Cannot read property ‘isFile‘ of undefined [How to Solve]
- [Solved] ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘
- [Solved] Syntax Error: TypeError: this.getOptions is not a function
- [Solved] Vue Error: Module build failed: Error: No PostCSS Config found in
- [Solved] ESLint error: Newline required at end of file but not found (eol-last)