Getting process exit code 1 when changing files #45
Description
Activity
> xxx@1.0.0 service-dev-watch > cross-env WDS_DEBUG=1 ./node_modules/.bin/wds --inspect=9230 ./src/index.ts [wds pid=12836] starting wds for workspace root C:\dev\github\xxx and workdir C:\Users\paulm\AppData\Local\Temp\wdsLTDysI [wds pid=12836] Not loading project config from C:\dev\github\xxx\wds.js, error encountered: ENOENT: no such file or directory, access 'C:\dev\github\xxx\wds.js' [wds pid=12836] Starting supervisor server at \\?\pipe\C:\Users\paulm\AppData\Local\Temp\wdsLTDysI\ipc.sock [wds pid=12836] Started HTTP server on \\?\pipe\C:\Users\paulm\AppData\Local\Temp\wdsLTDysI\ipc.sock [wds pid=12836] searching for filenames { config: { ignore: [], extensions: [ '.ts', '.tsx', '.jsx' ] }, root: 'C:\\dev\\github\\xxx', globs: [ '**/*{.tsx,.ts,.jsx,.mjs,.cjs,.js}', '!node_modules', '!**/*.d.ts' ] } [wds pid=12836] started build { root: 'C:\\dev\\github\\xxx', promptedBy: 'C:\\dev\\github\\xxx\\src\\index.ts', files: 5 } Running!!! Service listening on port: 8080 [wds pid=1516] syncworker file boot { isMainThread: false, hasWorkerData: true } Debugger attached. [wds pid=12836] \src\index.ts changed, restarting ... [wds pid=12836] rebuild { duration: '0.03871' } [wds pid=12836] child process exited with code null, exiting... Process finished with exit code 1This is the output using DEBUG mode.
Hm, it looks like you're running on WSL right? We have no formal support for windows or WSL but I will look into adding it. PRs also welcome! Also, that message is expected when the script you're actually running quits -- any chance you can share the contents of that script, or report that it works under other runners?
Sure, this is the script. If I change anything inside of it, I get the exit code 1.
import koa from "koa"; import { ServiceConfig } from "./service_config"; import { middleware_health_check, middleware_ignore_favicon } from "./middleware/AppBasicMiddleware"; import logger from "koa-logger"; const { port } = ServiceConfig.getConfig(); const app = new koa({ keys: ["xxx_secret_abc_123"] }); app.use(logger()); app.use(middleware_ignore_favicon); app.use(middleware_health_check); app.use(async (ctx) => { ctx.body = "Hiiiii!"; }); app.listen(port, () => { console.log(`Service listening on port: ${port}`); });
I'm not running WSL- just regular Windows.
I'm not sure what other runtimes I could compare it with. I can confirm that using nodemon to watch an output "dev-build" directory, which itself is watched and rebuilt by esbuild, runs and restarts without issue.
@lostpebble we just fixed a couple bugs with the
--watchmode, could you try running with it now? Also, the default is no longer to watch/supervise by default, and so you'll have to update your scripts to pass--watchexplicitly now
Hi there, just started using this project today- but noticed the "hot reload" doesn't work for me. This includes simple updates like just changing the text inside a
console.log(). I know it has nothing to do with the--inspect=9230as I tried without it and it still threw the error.