You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not totaly sure if I'm on the right track here:
We noticed the node process terminated regulary when we ran our script for vite in watch mode (vite build --watch) after migrating to vite 3.x.
We are under the impression, that if you use dynamic imports in an windows environment, rollup is also watching C:\. This seems to lead to the error.
Sadly, the termination is not deterministic. At some point in time, after a change, the process just craches. I suspect the build time has something to do with the crash: longer build times seem to favor an error.
After digging into rollup, we noticed that at some point the path /@vite/dynamic-import-helper is watched. Somehow, this path is 'translated' into C:\ in my Windows environment.
I created a breakpoint in node_modules\rollup\dist\es\shared\watch.js in async _addToNodeFs(path, initialAdd, priorWh, depth, target) in line 3184
This does only happen if dynamic imports are used.
I am not entirely sure if both behaviors (watching C:\ and crashing) are related.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I'm not totaly sure if I'm on the right track here:
We noticed the node process terminated regulary when we ran our script for vite in watch mode (
vite build --watch
) after migrating to vite 3.x.We are under the impression, that if you use dynamic imports in an windows environment, rollup is also watching
C:\
. This seems to lead to the error.Sadly, the termination is not deterministic. At some point in time, after a change, the process just craches. I suspect the build time has something to do with the crash: longer build times seem to favor an error.
After digging into rollup, we noticed that at some point the path
/@vite/dynamic-import-helper
is watched. Somehow, this path is 'translated' intoC:\
in my Windows environment.I created a breakpoint in
node_modules\rollup\dist\es\shared\watch.js
inasync _addToNodeFs(path, initialAdd, priorWh, depth, target)
in line 3184This does only happen if dynamic imports are used.
I am not entirely sure if both behaviors (watching
C:\
and crashing) are related.Reproduction
https://github.com/HerrDietz/vite-crash-reproducer/
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: