I’m working on a Vue.js project, and whenever I try to reload the page, it keeps reloading indefinitely without displaying any content. Additionally, starting the project takes an unusually long time (around 5 minutes).
I suspect it might be related to my Node.js or npm version, but I’m not sure. Here is my current setup:
- npm: 11.2.0
- Node.js: v22.12.0
- nvm: 1.2.2
This issue wasn’t present before, but I don’t remember what I changed that could have caused it.
I’ve tried the following but without success:
-
Clearing cache and reinstalling dependencies:
rm -rf node_modules package-lock.json npm cache clean --force npm install
-
Checking for errors during startup:
npm run serve -- --verbose
or
vue-cli-service serve
No critical errors were displayed.
-
Checking for outdated dependencies:
npm outdated npm update
-
Trying a different Node.js version
Since I’m using Node.js v22, which is quite new, I downgraded to a more stable LTS version:nvm use 18 rm -rf node_modules package-lock.json npm install
-
Checking for circular dependencies:
npx madge --circular src
Despite these efforts, the issue persists.