Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite dev server not loading because of require syntax #5

Closed
miachenmtl opened this issue Nov 26, 2021 · 1 comment
Closed

Vite dev server not loading because of require syntax #5

miachenmtl opened this issue Nov 26, 2021 · 1 comment

Comments

@miachenmtl
Copy link

miachenmtl commented Nov 26, 2021

After updating to vite 2.6.14, the dev server fails on load with this error message:

Error [ERR_REQUIRE_ESM]: require() of ES Module ........../node_modules/chalk/source/index.js from .........../node_modules/@nabla/vite-plugin-eslint/worker.js not supported.

I tried replacing this plugin with the original vite-plugin-eslint@1.0.3, which uses import statements instead of require, and that works fine.

Edit: See vitejs/vite#5694

@ArnaudBarre
Copy link
Collaborator

It's due to chalk 5 using ESM. It was a bad idea to use a wildcard for the versioning of it. I pinned it to v4 in 1.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants