Repository navigation
Wrong example #45048
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.
Description
Activity
interestingly it does work as documented when run as a
commonjsmodule, either by requiringprocessor by using the global.Yeah, looks like it was never tested when the mjs version was added. This is a known scheduling difference between cjs and mjs. The mjs example just needs to be updated to reflect the correct ordering. Interested in opening a PR?
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.
on Oct 18, 2022 I can put up a PR for a doc fix. I wonder tho if it would be good to add an additional note or comment about the different behavior in both module systems?
That would be helpful yes.
Any idea when this will be fixed? @jasnell
- added a commit that references this issue
on Jan 21, 2025 - added 5 commits that reference this issue
on Jan 27, 2025
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.
This example from the documentation (https://nodejs.org/api/process.html#when-to-use-queuemicrotask-vs-processnexttick)
doesn't work in Windows (node 16.13 and 18.11) and Ubuntu (node 18.11). Actual output is always
This looks like a documentation bug, but any explanation for this behavior in the main module would be appreciated.