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

ReferenceError: Cannot access 'StateContext' before initialization #51469

Open
khteh opened this issue Jan 15, 2024 · 0 comments
Open

ReferenceError: Cannot access 'StateContext' before initialization #51469

khteh opened this issue Jan 15, 2024 · 0 comments

Comments

@khteh
Copy link

khteh commented Jan 15, 2024

Version

v21.5.0

Platform

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

> [email protected] 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

> [email protected] 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)

Additional information

https://github.com/khteh/Node.JSRestAPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant