-
Notifications
You must be signed in to change notification settings - Fork 213
Running the dev tools on Windows causes Vite to fail due to watching / #538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@birjj This is occurring for me. Do you have any workaround for it? |
@rahulbansal16 My temporary workaround is moving the project from dir But the root problem also needs to be solved. |
@rahulbansal16 As mentioned by @Chieffo2021, moving the project to a different drive would be a workaround (as Another workaround might be to disable dumpstack logging entirely, by setting the following registry value: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]
"EnableLogFile" = dword:00000000 After doing so (and restarting your computer) you can delete the |
To add to @birjj's excellent analysis, I ended up addressing this by patching Obvious limitations with this approach but given the relatively high frequency of crash vs low frequency of dependency update it's worth it in my case. |
Hi everyone, I'm working with the CRX package and I've run into this issue where certain files seem to be locked, leading to an EBUSY error and crashes dev server. Has anyone experienced this issue with the CRX package or have any insights into what might be causing this error by using CRX? |
I didnt have this problem since switching to the beta release in ~december 2022 (which is not a beta btw) |
Build tool
Vite
Where do you see the problem?
Describe the bug
When running the dev server with the Vite plugin, I occassionally encounter the following error, causing the dev server to throw an error and fail:
This crashes the dev server, requiring me to manually run it again.
The most peculiar part of this is that Vite is watching
C:\
at all.After some digging with breakpoints I can conclude:
The error occurs when rollup attempts to access the file
C:\DumpStack.log.tmp
while it is locked by another process. This is more-or-less intended behavior. The problem is that rollup watchesC:\DumpStack.log.tmp
at all - it is entirely unrelated to the project.The problem happens because chokidar watches the directory a file is in (and since vite uses rollup, and rollup uses chokidar, this extends to vite itself).
As
@crxjs/vite-plugin
is using virtual files named/crx-*
, this means that chokidar is told to watch the/
directory, causing issues on Windows.Reproduction
None currently available. Running
npm run dev
on the default setup should be enough, although it might take some time for the error to happen (as it requires some other process to lock a file in the root directory just as chokidar tries to stat it).You can test if the issue is still happening by, even on Linux machines, by following these steps:
node_modules/rollup/dist/shared/index.js#4000
) with the expressionpaths_ === "/"
npm run dev
in that terminal.Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: