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

fix(core): handle falsy error in params.ts#handleErrors #10509

Merged

Conversation

gioragutt
Copy link
Contributor

Current Behavior

This happens to me when I run a node application and some error happens. The documented log I have is from when I Ctrl+Ced the app, but I've seen this before many times.

$ nx serve cli --watch=false

> nx run cli:serve --watch=false

chunk (runtime: main) main.js (main) 65.6 KiB [entry] [rendered]
chunk (runtime: worker) worker.js (worker) 64.2 KiB [entry] [rendered]
webpack compiled successfully (07835d0c74e6b24a)
Starting inspector on localhost:9229 failed: address already in use
[Nest] 51175  - 05/29/2022, 6:43:52 PM     LOG [NestFactory] Starting Nest application...
[Nest] 51175  - 05/29/2022, 6:43:52 PM     LOG [InstanceLoader] MongooseModule dependencies initialized +47ms
[Nest] 51175  - 05/29/2022, 6:44:22 PM   ERROR [MongooseModule] Unable to connect to the database. Retrying (1)...
^C
Unexpected error                                                                                               
TypeError: Cannot read properties of undefined (reading 'constructor')
    at /path/to/project/node_modules/nx/src/utils/params.js:12:21
    at Generator.throw (<anonymous>)
    at rejected (/path/to/project/node_modules/nx/node_modules/tslib/tslib.js:116:69)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Expected Behavior

There shouldn't be any uncaught errors within NX's internals

@nx-cloud
Copy link

nx-cloud bot commented May 29, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 983eb55. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 12 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented May 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Jun 8, 2022 at 9:50PM (UTC)

@aqemi
Copy link

aqemi commented Jun 1, 2022

The root cause for this looks like located here
https://github.com/nrwl/nx/blob/master/packages/node/src/executors/node/node.impl.ts#L117

@AgentEnder AgentEnder enabled auto-merge (squash) June 7, 2022 21:28
@AgentEnder
Copy link
Member

@gioragutt can you rebase this? E2e failure looks unrelated

@AgentEnder AgentEnder disabled auto-merge June 7, 2022 23:21
@gioragutt
Copy link
Contributor Author

@gioragutt can you rebase this? E2e failure looks unrelated

Will do when I get back to my PC. Is it possible to just rerun the failed workflow?

@AgentEnder
Copy link
Member

Yeah, the failure wasn't a timeout or similar that would indicate a flaky test though so I believe the rebase would be most beneficial

@gioragutt gioragutt force-pushed the giorag/handle-unknown-error-at-runtime branch from f60b3bc to 92abf56 Compare June 8, 2022 18:18
@gioragutt
Copy link
Contributor Author

@AgentEnder CI passed 👍🏻

@AgentEnder AgentEnder merged commit cad9032 into nrwl:master Jun 9, 2022
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants