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
ReferenceError: Cannot access 'StateContext' before initialization #51469
Linux khteh-p17-2i 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
I have a Node.JS project with 3 separate modules. I define a class in one of the module, rollup the *.ts files, and when run, hit the following error:
$ n start
> node.jsrestapi@1.0.0 start
> export NODE_ENV=development&& node --experimental-specifier-resolution=node build/src/webapi/server.js
ReferenceError: Cannot access 'StateContext' before initialization
at file:///usr/src/Node.JSRestAPI/src/webapi.core/build/index.js:622:54
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:120:12)
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
$ n start
> node.jsrestapi@1.0.0 start
> export NODE_ENV=development&& node --experimental-specifier-resolution=node build/src/webapi/server.js
ReferenceError: Cannot access 'StateContext' before initialization
at file:///usr/src/Node.JSRestAPI/src/webapi.core/build/index.js:622:54
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:120:12)
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
github-actions commentedon May 24, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jun 24, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.