Giter Club home page Giter Club logo

Comments (4)

lostpebble avatar lostpebble commented on September 2, 2024
> [email protected] 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 1

This is the output using DEBUG mode.

from wds.

airhorns avatar airhorns commented on September 2, 2024

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?

from wds.

lostpebble avatar lostpebble commented on September 2, 2024

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.

from wds.

airhorns avatar airhorns commented on September 2, 2024

@lostpebble we just fixed a couple bugs with the --watch mode, 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 --watch explicitly now

from wds.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.