Node Modules Chunks Error

This error has come to a point where its affecting my velocity , I have tried this fix optimizeDeps: { exclude: ["node_modules/.cache"] } but it still keeps on appearing again and again https://ribbon.gadget.app/edit/tanmay-dev e5e77b319605412f4ac25872609e0578
No description
11 Replies
ljspoor94
ljspoor9411mo ago
There definitely must be something changed in Gadget as an overall, been experiencing this myself
Chocci_Milk
Chocci_Milk11mo ago
Hello, Could you please share the URL of the app and the environment that you're working on?
Tanmay
TanmayOP11mo ago
I have shared it above before the screenshot also the trace id is there
Chocci_Milk
Chocci_Milk11mo ago
Did this issue still occur if you restarted the app or made a change to your api?
ljspoor94
ljspoor9411mo ago
I've just randomly run into this again too, trade id for mine: 545c81f3a79be3514dd06b7cda78a860
No description
ljspoor94
ljspoor9411mo ago
(I've restarted quite a few times in the past few days but this still happens occasionally)
[Gadget] Alan
[Gadget] Alan11mo ago
I think this is the real error that you two are having:
The file does not exist at "/gadget/app/node_modules/.vite/deps/chunk-XYZ.js?v=c34f179e" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
The file does not exist at "/gadget/app/node_modules/.vite/deps/chunk-XYZ.js?v=c34f179e" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
And it seems to be a Vite problem in general because there are multiple issues related to this error in the Vite github repo.
Simon
Simon11mo ago
Also been seeing this a lot over the past weeks. Let’s hope vite fixes it.
[Gadget] Alan
[Gadget] Alan11mo ago
I haven't been able to reproduce this. Some people (https://github.com/vitejs/vite/discussions/17738) have mentioned the following workaround: - Clear browser cache - Set this in the vite.config.js file
optimizeDeps: {
force: true,
},
optimizeDeps: {
force: true,
},
ljspoor94
ljspoor9411mo ago
Just ran into this again, I think. I got the following from the server to add (and obviously isn't sorted the job, shall I drop it and replace with the above?
optimizeDeps: {
exclude: ['node_modules/.cache']
}
optimizeDeps: {
exclude: ['node_modules/.cache']
}
No description
[Gadget] Alan
[Gadget] Alan11mo ago
Probably. Please let me know if the fixes above works.

Did you find this page helpful?