Skip to content
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

watcher gets stuck #8

Open
rohal12 opened this issue Dec 28, 2024 · 4 comments
Open

watcher gets stuck #8

rohal12 opened this issue Dec 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@rohal12
Copy link
Contributor

rohal12 commented Dec 28, 2024

sometimes the watch process gets stuck and the process needs to be restarted.
running bun cross-env NODE_ENV=development bun --watch .build/run_dev.ts in VSCode
on a quite simple project (had it happen on more complex projects as well):

 ThyWeaver - Running in dev mode ㅤ
Dev Server available at http://localhost:3001

 BUILDER  ⠋ Running Rollup...EPERM: Operation not permitted
   errno: -1
   code: "PLUGIN_ERROR"
 syscall: "unlink"

21207 |             // We only ever create a single event listener to avoid max listener and
21208 |             // other issues
21209 |             handleBeforeExit = () => {
21210 |                 for (const [pluginDriver, reject] of rejectByPluginDriver) {
21211 |                     const unfulfilledActions = pluginDriver.getUnfulfilledHookActions();
21212 |                     reject(new Error(`Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:\n` +
                                   ^
error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(postcss) transform "C:\\Games\\twine\\hexmap\\src\\assets\\app\\styles\\main.scss"
(node-resolve) resolveId "@svgdotjs/svg.js" "C:\\Games\\twine\\hexmap\\src\\assets\\app\\hex\\basics.ts"
(node-resolve) resolveId "honeycomb-grid" "C:\\Games\\twine\\hexmap\\src\\assets\\app\\hex\\basics.ts"
(node-resolve) resolveId "./grid" "C:\\Games\\twine\\hexmap\\src\\assets\\app\\hex\\basics.ts"
(node-resolve) resolveId "./CustomHex" "C:\\Games\\twine\\hexmap\\src\\assets\\app\\hex\\basics.ts"
(node-resolve) resolveId "./TileType" "C:\\Games\\twine\\hexmap\\src\\assets\\app\\hex\\basics.ts"
      at handleBeforeExit (C:\Games\twine\hexmap\node_modules\.pnpm\[email protected]\node_modules\rollup\dist\es\shared\node-entry.js:21212:28)
21207 |             // We only ever create a single event listener to avoid max listener and
21208 |             // other issues
21209 |             handleBeforeExit = () => {
21210 |                 for (const [pluginDriver, reject] of rejectByPluginDriver) {
21211 |                     const unfulfilledActions = pluginDriver.getUnfulfilledHookActions();
21212 |                     reject(new Error(`Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:\n` +
                                   ^
error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(smart-copy) buildStart
      at handleBeforeExit (C:\Games\twine\hexmap\node_modules\.pnpm\[email protected]\node_modules\rollup\dist\es\shared\node-entry.js:21212:28)
 BUILDER  ⠧ Running Rollup...```
@greatsquare0
Copy link
Owner

Do you have enableFSLinkCopyOnDevMode: true on your thyweaver.config? (Under builder options)
On my testing, Bun on Windows cannot make the syslinks without exec with admin privilege, Node seams to do it just fine (On win 10 and 11 pro), but I haven't tested on other machine
This option is experimental, as syslinks act strange depending on OS and runtime

@rohal12
Copy link
Contributor Author

rohal12 commented Dec 30, 2024

no it is still on false. if I change it to true it will always crash due not being able to do a symlink.

@greatsquare0 greatsquare0 added the bug Something isn't working label Dec 30, 2024
@rohal12
Copy link
Contributor Author

rohal12 commented Jan 5, 2025

I updated bun to the latest version and it seems to be running fine so far.
One question though - sometimes the watcher decides to re-build the project while I am in the middle of some unfinished code and just taking a pause to think. Then the compilation process usually stops with some invalid syntax error (not surprising, since I wasn't done with the code yet) and the whole task needs to be restarted. Is there a way to handle this more gracefully?

@greatsquare0
Copy link
Owner

It's probably related to auto save on your editor, you could try increasing the watcher delay on thyweaver config or disable auto save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants