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
The tests should run rather than fail. They are correct in node and in the previous version of bun (1.3.13)
What do you see instead?
Cannot access 'isCI' before initialization. (transpiler issue i guess, the file has a definition after exporting something with await, so maybe a top level await issue?)
packages/test/src/test/ai-provider/LlamaCpp_ChatWrapper.integration.test.ts:
PermanentJobError: Provider LOCAL_LLAMACPP failed for ModelDownloadTask: Cannot access 'isCI' before initialization.
--- Error diagnostics ---
ReferenceError: Cannot access 'isCI' before initialization.
ReferenceError: Cannot access 'isCI' before initialization.
at _init (/workspaces/workglow/libs/node_modules/.bun/node-llama-cpp@3.18.1+7524df1edfed9f02/node_modules/node-llama-cpp/dist/utils/createModelDownloader.js:284:27)
at async _create (/workspaces/workglow/libs/node_modules/.bun/node-llama-cpp@3.18.1+7524df1edfed9f02/node_modules/node-llama-cpp/dist/utils/createModelDownloader.js:366:31)
at async (/workspaces/workglow/libs/providers/node-llama-cpp/dist/ai-runtime.js:368:28)
at async execute (/workspaces/workglow/libs/packages/ai/src/job/AiJob.ts:278:13)
at async execute (/workspaces/workglow/libs/packages/ai/src/execution/QueuedExecutionStrategy.ts:59:17)
at async execute (/workspaces/workglow/libs/packages/ai/src/task/base/AiTask.ts:165:20)
at async executeTask (/workspaces/workglow/libs/packages/task-graph/src/task/TaskRunner.ts:480:36)
at async run (/workspaces/workglow/libs/packages/task-graph/src/task/TaskRunner.ts:214:26)
at processTicksAndRejections (native:7:39)
The parallel-dynamic-import TDZ bug (ReferenceError: Cannot access "..." before initialization when two dynamic import()s share a still-suspended top-level-await dependency, as in node-llama-cpp) now resolves correctly. Verified on current main:
$ bun driver.mjs # two parallel dynamic imports of a shared TLA dep
entry1 foo: 123
entry2 foo: 123
test/js/bun/resolve/dynamic-import-tla-cycle.test.ts passes 6/6, including the sibling dynamic imports sharing a TLA wrapper wait for its post-await exports regression test.
#32437 threads the referrer module's asyncEvaluationOrder through to JSC (via JSModuleLoader::asyncEvaluationOrderForKey()) so the TLA self-deadlock skip only fires for the genuine Nitro self-deadlock, not for unrelated parallel dynamic imports. It supersedes the earlier attempt in #30656. The fix ships in the next release / latest canary.
Verified on main at df84f8d: parallel dynamic imports that share a top-level-await dependency (the node-llama-cpp config.ts → isCI pattern) now wait for the post-await bindings instead of hitting TDZ.
Activity
github-actions commentedon May 14, 2026
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
robobun commentedon May 14, 2026
✅ Fixed on
mainvia #32437 (merged).The parallel-dynamic-import TDZ bug (
ReferenceError: Cannot access "..." before initializationwhen two dynamicimport()s share a still-suspended top-level-await dependency, as innode-llama-cpp) now resolves correctly. Verified on current main:test/js/bun/resolve/dynamic-import-tla-cycle.test.tspasses 6/6, including thesibling dynamic imports sharing a TLA wrapper wait for its post-await exportsregression test.#32437 threads the referrer module's
asyncEvaluationOrderthrough to JSC (viaJSModuleLoader::asyncEvaluationOrderForKey()) so the TLA self-deadlock skip only fires for the genuine Nitro self-deadlock, not for unrelated parallel dynamic imports. It supersedes the earlier attempt in #30656. The fix ships in the next release / latest canary.bump WEBKIT_VERSION to preview-pr-230-298067bc
sroussey commentedon May 14, 2026
Just a note that this is a regression in 1.3.14, this does not exist in 1.3.13 nor node 20/22/24
module-loader: pass sourceOrigin-derived referrer to dynamic import
bump WEBKIT_VERSION to preview-pr-230-298067bc
module-loader: pass sourceOrigin-derived referrer to dynamic import
module-loader: pass sourceOrigin-derived referrer to dynamic import
bump WEBKIT_VERSION to preview-pr-230-d57ee3d2
module-loader: pass sourceOrigin-derived referrer to dynamic import
module-loader: hoist referrer-key helper, fix builtin round-trip
bake: revert bake:/ referrer plumbing — it breaks bake production builds
module-loader: pass sourceOrigin-derived referrer to dynamic import
module-loader: hoist referrer-key helper, fix builtin round-trip
bake: revert bake:/ referrer plumbing — it breaks bake production builds
module-loader: pass sourceOrigin-derived referrer to dynamic import
module-loader: hoist referrer-key helper, fix builtin round-trip
bake: revert bake:/ referrer plumbing — it breaks bake production builds
module-loader: pass sourceOrigin-derived referrer to dynamic import
module-loader: hoist referrer-key helper, fix builtin round-trip
bake: revert bake:/ referrer plumbing — it breaks bake production builds
robobun commentedon Jul 24, 2026
Fixed by #32437.
Verified on main at df84f8d: parallel dynamic imports that share a top-level-await dependency (the node-llama-cpp
config.ts→isCIpattern) now wait for the post-await bindings instead of hitting TDZ.vs 1.3.14+0d9b296af: