Eslint very slow on Mac and Windows after updating from nuxt 3.6.5
to 3.7.0
#25257
Replies: 2 comments
-
Here are some additional measurements I've done on systems I could get my hands on. I can confirm that this problem occurs on both Mac and Windows, but not on Linux (neither on Linux within Docker, when mounting the working directory from macs file system). The repo: https://github.com/bcc-code/bmm-web The commands I ran on MacOS and Linux: git checkout <commit-id>
pnpm i
time npx eslint --ext ts,js,vue,json ./components/MediaPlayer.vue --debug on Windows: git checkout <commit-id>
pnpm i
Measure-Command { npx eslint --ext ts,js,vue,json ./components/MediaPlayer.vue --debug }
The timing doesn't change when running |
Beta Was this translation helpful? Give feedback.
-
I was able to fix this issue by updating using the command Running the command mentioned in the last comment here now took about For me, I don't really know by what this issue arose or what exactly fixed it. Maybe its because I used the command, recommended to use for updating, or maybe because something related to this changed in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After updating nuxt to
3.7.0
(or anything beyond3.6.5
) runningeslint
became terribly slow on my mac. I've already done quite some research (https://discord.com/channels/473401852243869706/1195082443967967273, followed by vuejs/vue-eslint-parser#216) to get closer to how this downgrade in speed. After some testing, I noticed that the speed gets back to the previous level when removing theproject
setting in my eslint configuration (vuejs/vue-eslint-parser#216 (comment)). Diving into the configuration, and what changed there, I've now ended now up at #22476. When reverting the effect of this ticket (by manually replacing the import statements for@vueuse/core
,vue
and@unhead/vue
), it is a lot faster (20s instead of 150s).I ran a search/replace on the following statements:
import('../../node_modules/.pnpm/vue@3.4.14_typescript@5.3.3/node_modules/vue')
->import('vue')
import('../../node_modules/.pnpm/@unhead+vue@1.8.10_vue@3.4.14/node_modules/@unhead/vue')
->import('@unhead/vue')
import('../../node_modules/.pnpm/@vueuse+core@10.7.2_vue@3.4.14/node_modules/@vueuse/core')
->import('@vueuse/core')
I cannot wrap my head around why the different imports would take so much longer to execute...
My typescript compiler now starts complaining when having the file open (but just because I have
shamefully-hoist
disabled - enabling it again solves the hints but it works also without this option), but it seems to work. I just don't know how the system now resolves this package. I have only one version installed (according to my pnpm lock file) but it is multiple times in the file system, all referencing to the same files, I guess.EDIT: I couldn't notice any increase in time on my CI (github actions). Here's some of my development environment, where I experienced this problem:
Beta Was this translation helpful? Give feedback.
All reactions