Watch mode unhandled promise rejection (failed to parse JSON)
sergey-buturlakin opened this issue · comments
Running estrella in the watch mode in some cases produces the following error:
Wrote dist/app.js (129.9kB, 72.89ms) Watching files for changes... Unhandled promise rejection: Error: failed to parse dist\.esbuild.7czfvj1r7mzo41vo8xvg1utpi4512zaw2z.meta.json: Unexpected token ',' at Be (d:\temp\estrella-test-1\sample\node_modules\estrella\<estrella>\util.js:133:11) at y (d:\temp\estrella-test-1\sample\node_modules\estrella\<estrella>\estrella.js:754:23) at i (d:\temp\estrella-test-1\sample\node_modules\estrella\<estrella>\watch\watch.ts:52:25) at Object.nl (d:\temp\estrella-test-1\sample\node_modules\estrella\<estrella>\watch\watch.ts:99:3) at rn (d:\temp\estrella-test-1\sample\node_modules\estrella\<estrella>\estrella.js:768:23) at processTicksAndRejections (internal/process/task_queues.js:93:5)
If I run build without the watch mode it completes without errors with a valid JS and CSS files.
I've attached the sample project that reproduces the error.
Environment:
Windows 10
NodeJS - v14.15.0
This might be be fixed by evanw/esbuild#504
In your package.json, if you set this:
"resolutions": {
"esbuild": "0.8.5",
}
it seems to work
Thanks, resolution to the latest esbuild fixes the issue.
So I think the issue may be closed when estrella will update dependency to esbuild version 0.8.5+.