You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v20.6] CJS runs repeatedly when there are circular dependencies when loaded by ESM #49497
changed the title [-][v20.6] CJS cycle dependency throwing error is loaded by ESM[/-][+][v20.6] CJS cycle dependencies throw an error when being loaded by ESM[/+]on Sep 5, 2023
changed the title [-][v20.6] CJS cycle dependencies throw an error when being loaded by ESM[/-][+][v20.6] CJS runs repeatedly when there are circular dependencies when loaded by ESM[/+]on Sep 5, 2023
Reacted by Nicolò Ribaudo, liuxingbaoyu, Matthieu Riegler, Matthias Oßwald, Chemi Atlow, Christopher Svanefalk, Filipoliko, Konstantin Shutkin, Anderson Arboleya, Béré Cyriac and 2 more
Activity
[-][v20.6] CJS cycle dependency throwing error is loaded by ESM[/-][+][v20.6] CJS cycle dependencies throw an error when being loaded by ESM[/+][-][v20.6] CJS cycle dependencies throw an error when being loaded by ESM[/-][+][v20.6] CJS runs repeatedly when there are circular dependencies when loaded by ESM[/+]fix: build issue, `Cannot redefine property: File`
[INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
nicolo-ribaudo commentedon Sep 5, 2023
Note that this is breaking
@babel/core, and thus all the frameworks/project that use it. It would be great to prioritize it 🙏targos commentedon Sep 5, 2023
Can someone give a reproducible example? The code from https://github.com/liuxingbaoyu/node-v20.6-bug doesn't show the problem (it throws an error in
mod/index.js).liuxingbaoyu commentedon Sep 5, 2023
Sorry, I forgot to push the second commit.
But the initial error is also different due to the regression.
liuxingbaoyu commentedon Sep 5, 2023
Please try again, thanks!
nicolo-ribaudo commentedon Sep 5, 2023
nicolo-ribaudo commentedon Sep 5, 2023
A minimal reproduction:
Running
node index.mjslogs twice but it should log once.targos commentedon Sep 5, 2023
I have a repro. Starting to bisect.
[INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
[INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
nicolo-ribaudo commentedon Sep 5, 2023
@targos If it helps, it looks like the problem is that ESM's CJS loader doesn't set this
loaded = truebefore evaluating the CJS module.Here probably:
node/lib/internal/modules/esm/translators.js
Line 326 in 5b31ff1
targos commentedon Sep 5, 2023
Bug is introduced by #47999
44 remaining items
[ui5-logger][INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
[ui5-logger][ui5-logger][INTERNAL] Azure Pipelines: Switch back to No…
[ui5-project][INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
[ui5-cli][INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
[project][INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
[cli][INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
[cli][INTERNAL] Azure Pipelines: Switch back to Node 20.5.x
feat!: drop Node.js 18 support, require >=20.6.1
feat!: drop Node.js 18 support, require >=20 (#623)
ci: preserve Node 20 SES-viable patch history (per kriskowal review on …
chore(ci): drop Node.js 20 from the test matrix
chore(ci): drop Node.js 20 from the test matrix
chore(ci): drop Node.js 20 from the test matrix
chore(ci): drop Node.js 20 from the test matrix
Remove the Frida/detours approach