S
SolidJS4mo ago
zobweyt

Endless "[vite] ✨ optimized dependencies changed. reloading"

Could anyone explain why it takes an exorbitant amount of time to optimize dependencies after installing any package from npm/pnpm/yarn? This issue seems to occur randomly during development and provides a terrible developer experience (DX). Additionally, if I manually stop the dev server and try to run it again, it just says:
[get-port] Unable to find an available port (tried 3000 on host "localhost"). Using alternative port 3001.
[get-port] Unable to find an available port (tried 3000 on host "localhost"). Using alternative port 3001.
Steps to reproduce: 1. Execute pnpm create solid and pick the default options. 2. Execute pnpm dev, open the app in the browser, and then end the process. 3. Install any dependency (@solid-primitives/event-listener in this case). 4. Go to Counter.tsx and modify it to use the newly installed dependency. 5. Execute pnpm dev. 6. Go to the web browser and navigate to a page where the Counter component is not yet rendered (e.g., /about in this case). 7. Go to the /index page (the route where the Counter component should be rendered). 8. Observe the Vite optimization process, which never seems to complete in the console.
2 Replies
zobweyt
zobweytOP4mo ago
here's complete video to reproduce this
zobweyt
zobweytOP4mo ago
am I missing something? why is this happening?
~ $ cmd /c ver

Microsoft Windows [Version 10.0.22621.3958]
~ $ pnpm -v
9.7.0
~ $ cmd /c ver

Microsoft Windows [Version 10.0.22621.3958]
~ $ pnpm -v
9.7.0
it appears to be machine problem as it works fine on my laptop but not on my pc
Want results from more Discord servers?
Add your server