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

ReactApp doesn't let test to exit #5391

Open
tsuf239 opened this issue Jan 1, 2024 · 1 comment
Open

ReactApp doesn't let test to exit #5391

tsuf239 opened this issue Jan 1, 2024 · 1 comment
Labels
🐛 bug Something isn't working 🕹️ simulator Related to the `sim` compilation target

Comments

@tsuf239
Copy link
Collaborator

tsuf239 commented Jan 1, 2024

I tried this:

bring ex;

let website = new ex.ReactApp(
  projectPath: "../raffle-client",
   buildDir: "/dist",
  localPort: 5173,
  startCommand: "npm run dev",
);

test {
   assert(1 + 1 == 2);
}

This happened:

The test run completely but doesn't exit the process (ctrl+c is needed)

I expected this:

to run and exit

Is there a workaround?

ctrl+c

Anything else?

No response

Wing Version

0.54.15

Node.js Version

No response

Platform(s)

MacOS

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@tsuf239 tsuf239 added the 🐛 bug Something isn't working label Jan 1, 2024
@Chriscbr Chriscbr added the 🕹️ simulator Related to the `sim` compilation target label Jan 2, 2024
@tsuf239
Copy link
Collaborator Author

tsuf239 commented Jan 18, 2024

therefore cannot run wing it ... when wing test ... runs.
related to #5256

wing it
  wing:update checking for updates... +0ms
The Wing Console is running at http://localhost:3000/
Analytics event stored at /var/folders/2x/k4trzqh147x6rywbk608tv000000gn/T/wing-analytics/006a9eef-e329-445f-a84c-92d31a49d63f.json
/Users/sebastian/.volta/tools/image/packages/winglang/lib/node_modules/winglang/node_modules/@winglang/sdk/lib/target-sim/react-app.inflight.js:43
                    throw new Error(stderr);
                    ^

Error: (node:78229) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:78229) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
/Users/sebastian/projects/wing-cloud/examples/examples/react-website/website/node_modules/webpack-dev-server/lib/Server.js:2557
        throw error;
        ^

Error: listen EADDRINUSE: address already in use 0.0.0.0:30353
    at Server.setupListenHandle [as _listen2] (node:net:1872:16)
    at listenInCluster (node:net:1920:12)
    at doListen (node:net:2069:7)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -48,
  syscall: 'listen',
  address: '0.0.0.0',
  port: 30353
}

Node.js v20.10.0

    at /Users/sebastian/.volta/tools/image/packages/winglang/lib/node_modules/winglang/node_modules/@winglang/sdk/lib/target-sim/react-app.inflight.js:43:27
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:514:28)
    at Pipe.<anonymous> (node:net:337:12)

Node.js v20.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🕹️ simulator Related to the `sim` compilation target
Projects
Status: 🤝 Backlog - handoff to owners
Development

No branches or pull requests

2 participants