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

Cannot access '$' before initialization #645

Closed
gajus opened this issue Jun 22, 2023 · 4 comments
Closed

Cannot access '$' before initialization #645

gajus opened this issue Jun 22, 2023 · 4 comments

Comments

@gajus
Copy link

gajus commented Jun 22, 2023

Expected Behavior

No error.

Actual Behavior

ReferenceError: Cannot access '$' before initialization
    at AsyncHook.syncCwd (file:///D:/a/turbowatch/turbowatch/node_modules/zx/build/core.js:324:5)
    at emitHook (node:internal/async_hooks:235:38)
    at promiseResolveHook (node:internal/async_hooks:364:3)
    at file:///D:/a/turbowatch/turbowatch/node_modules/vitest/dist/vendor-rpc.4d3d7a54.js:54:7
    at withSafeTimers (file:///D:/a/turbowatch/turbowatch/node_modules/vitest/dist/vendor-rpc.4d3d7a54.js:21:20)
    at Proxy.safeSendCall (file:///D:/a/turbowatch/turbowatch/node_modules/vitest/dist/vendor-rpc.4d3d7a54.js:46:41)
    at process.exit (file:///D:/a/turbowatch/turbowatch/node_modules/vitest/dist/vendor-execute.132a3e09.js:321:11)
    at fatalError (node:internal/async_hooks:174:11)
    at emitHook (node:internal/async_hooks:239:5)
    at promiseResolveHook (node:internal/async_hooks:364:3)

Steps to Reproduce the Problem

https://github.com/gajus/turbowatch/actions/runs/5351190044/jobs/9704716871?pr=49

Specifications

  • Version: latest
  • Platform: Windows

Equivalent to earlier reported issue:

#482

This happens only on Windows.

@kavandalal
Copy link

Hi @gajus, I tried replicating this issue on my windows system, but I was unsuccessful. It would be great if you can explain more about how to replicate this error.

@gajus
Copy link
Author

gajus commented Jun 27, 2023

Here is a link: gajus/turbowatch#49

@k7sleeper
Copy link

Up from this morning, I have the same problem:

ReferenceError: Cannot access '$' before initialization
    at AsyncHook.syncCwd (file:///C:/Users/KopruchKlaus(Group)/Git-Repositories/materna/javascript_commons/packages/cli-tools/zx-wrapper/node_modules/zx/build/core.js:324:5)
    at emitHook (node:internal/async_hooks:235:38)
    at promiseResolveHook (node:internal/async_hooks:364:3)
    at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
    at async DefaultModuleLoader.import (node:internal/modules/esm/loader:246:24)
    at async loadESM (node:internal/process/esm_loader:40:7)
    at async handleMainPromise (node:internal/modules/run_main:66:12)

Until this morning, I never had any problems using zx.

@k7sleeper
Copy link

This morning I turned on my PC in the office. Everything was ok with zx.

After upgrade from v7.2.2 to v7.2.3 I also have this issue on my office PC.

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

No branches or pull requests

4 participants