repl: fix eval errors thrown after close throwing `ERR_USE_AFTER_CLOSE` by dario-piotrowicz · Pull Request #58791 · nodejs/node · GitHub
Skip to content

repl: fix eval errors thrown after close throwing ERR_USE_AFTER_CLOSE#58791

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
dario-piotrowicz:dario/58784/repl-error-after-close-fix
Jun 28, 2025
Merged

repl: fix eval errors thrown after close throwing ERR_USE_AFTER_CLOSE#58791
nodejs-github-bot merged 1 commit intonodejs:mainfrom
dario-piotrowicz:dario/58784/repl-error-after-close-fix

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

Fixes #58784

prevent incorrect throws of ERR_USE_AFTER_CLOSE errors when the eval function of a repl server returns an error after the repl server has been closed

prevent incorrect throws of `ERR_USE_AFTER_CLOSE` errors when the eval
function of a repl server returns an error after the repl server
has been closed
@dario-piotrowicz dario-piotrowicz requested a review from lpinca June 22, 2025 12:41
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Jun 22, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 22, 2025

Copy link
Copy Markdown
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGMT

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 22, 2025
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 22, 2025
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@hildjj
Copy link
Copy Markdown

hildjj commented Jun 22, 2025

I have confirmed that this patch fixes my issue.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@dario-piotrowicz dario-piotrowicz added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 28, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 28, 2025
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
node:internal/modules/esm/resolve:275
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/opt/hostedtoolcache/node/22.16.0/x64/lib/node_modules/@node-core/utils/node_modules/css-what/dist/esm/index.js' imported from /opt/hostedtoolcache/node/22.16.0/x64/lib/node_modules/@node-core/utils/node_modules/cheerio-select/lib/esm/index.js
at finalizeResolution (node:internal/modules/esm/resolve:275:11)
at moduleResolve (node:internal/modules/esm/resolve:860:10)
at defaultResolve (node:internal/modules/esm/resolve:984:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:780:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:704:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:687:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:305:38)
at ModuleJob._link (node:internal/modules/esm/module_job:137:49) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///opt/hostedtoolcache/node/22.16.0/x64/lib/node_modules/@node-core/utils/node_modules/css-what/dist/esm/index.js'
}

Node.js v22.16.0

https://github.com/nodejs/node/actions/runs/15943283499

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 28, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 28, 2025
@nodejs-github-bot nodejs-github-bot merged commit 9fe3316 into nodejs:main Jun 28, 2025
81 of 82 checks passed
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@dario-piotrowicz dario-piotrowicz deleted the dario/58784/repl-error-after-close-fix branch June 28, 2025 22:36
targos pushed a commit that referenced this pull request Jul 3, 2025
prevent incorrect throws of `ERR_USE_AFTER_CLOSE` errors when the eval
function of a repl server returns an error after the repl server
has been closed

PR-URL: #58791
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
aduh95 pushed a commit that referenced this pull request Jul 21, 2025
prevent incorrect throws of `ERR_USE_AFTER_CLOSE` errors when the eval
function of a repl server returns an error after the repl server
has been closed

PR-URL: #58791
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
aduh95 pushed a commit that referenced this pull request Jul 24, 2025
prevent incorrect throws of `ERR_USE_AFTER_CLOSE` errors when the eval
function of a repl server returns an error after the repl server
has been closed

PR-URL: #58791
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERR_USE_AFTER_CLOSE in repl with async eval

6 participants