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 'PuppetSkelton' before initialization #165

Closed
huan opened this issue Oct 22, 2021 · 0 comments
Closed

ReferenceError: Cannot access 'PuppetSkelton' before initialization #165

huan opened this issue Oct 22, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@huan
Copy link
Member

huan commented Oct 22, 2021

ReferenceError: Cannot access 'PuppetSkelton' before initialization
    at file:///home/runner/work/puppet/puppet/src/puppet/puppet.ts:65:27
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)
not ok 9 - src/mixins/memory-mixin.spec.ts # time=7128.042ms

Explanation

Solution

When we import an internal module from another internal module, we should always direct import it from its module file, instead of from any other mod.js, so that we will only load the module we needed, and do not load any unrelated modules, which might cause this issue.

@huan huan added the bug Something isn't working label Oct 22, 2021
@huan huan closed this as completed in 8284f1d Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant