zx
zx copied to clipboard
Cannot access '$' before initialization
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:
https://github.com/google/zx/issues/482
This happens only on Windows.
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.
Here is a link: https://github.com/gajus/turbowatch/pull/49
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.
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.