Open
Description
Version
4.5.15
Environment info
System:
OS: macOS 11.6
CPU: (4) x64 Intel(R) Core(TM) i5-4308U CPU @ 2.80GHz
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.0/bin/npm
Browsers:
Chrome: 95.0.4638.54
Edge: Not Found
Firefox: Not Found
Safari: 15.1
npmGlobalPackages:
@vue/cli: 4.5.15
Steps to reproduce
- run
npm install -g @vue/cli
to install the Vue CLI globally. - Run
vue create my-project
to create the project. - Run
cd my-project
and navigate to the directory where the project you created is located. - Run
npm audit fix --force
because you will get a message that there is a vulnerability problem during installation. - However, I get a message that the vulnerability issue cannot be resolved.
- Ignore the vulnerability issue for now and run
npm run serve
. TypeError: eslint.CLIEngine is not a constructor
is raised.
$ npm install -g @vue/cli
$ vue create my-project
$ cd my-project
$ npm audit fix --force
$ npm run serve
$ npm run serve
> my-project@0.1.0 serve
> vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
ERROR Failed to compile with 1 errors 19:48:55
Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):
TypeError: eslint.CLIEngine is not a constructor
at Object.module.exports (~/work/oss-gate/my-project/node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js:223:27)
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.
What is expected?
It seems that the problem has already been fixed in the dev
branch (vuejs/vue-cli#6714), but I don't think the fix has been applied to the v4
branch.
Is is possible to backport that fix to v4
branch?
What is actually happening?
TypeError: eslint.CLIEngine is not a constructor
is raised.
Supplementary information
If you ignore the vulnerability issue message and don't run npm audit fix --force
, you won't get an error when you run npm run serve
.
Metadata
Metadata
Assignees
Labels
No labels