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
Every nitro dev build prints SWC sourcemap errors against four .js files inside @workflow/ai/dist/ (providers/anthropic.js, agent/durable-agent.js, agent/stream-text-iterator.js, agent/do-stream-step.js). Builds still succeed, but the noise is constant on every reload.
Environment
@workflow/ai: 4.1.2
@workflow/core (peer): 4.2.4 (resolved by pnpm — note the minor split)
ai: 5.0.161
zod: 3.25.76
Build tool: Nitro dev (rollup builder, nitro-dev preset, compatibility date 2024-12-26)
Node: 22.x, pnpm install
Stack trace points to crates/swc/src/lib.rs:398
Error output (representative)
ERROR failed to read input source map: failed to find input source map file
"anthropic.js.map" in "node_modules/.../@workflow/ai/dist/providers/anthropic.js"
file as either ".../anthropic.js.map" or with appended .map
at crates/swc/src/lib.rs:398
Repeats for the four files listed above.
What I verified locally
The .map files are present and valid:
File
.js size
.js.map size
.map valid JSON?
dist/providers/anthropic.js
239 B
582 B
yes
dist/agent/durable-agent.js
35,364 B
79,787 B
yes
dist/agent/stream-text-iterator.js
19,123 B
31,488 B
yes
dist/agent/do-stream-step.js
31,410 B
51,204 B
yes
Each .js ends with //# sourceMappingURL=<name>.js.map and the corresponding .map parses with all expected keys (version, file, sources, mappings, sourcesContent).
The sources field points at the TypeScript originals (e.g. ../../src/providers/anthropic.ts), which are not included in the published tarball. That may be what SWC is actually complaining about even though the message says "find input source map file" — i.e. the map exists, but the upstream sources it references can't be resolved.
Reproduction
Install @workflow/ai@4.1.2 in a Nitro-based app (we hit this in apps/unified-api/ running pnpm dev:api through Turbo).
Start the dev server.
Errors print on every build/reload.
Impact
Cosmetic — builds and the dev server still work. But it's noisy enough to drown out real errors and shows up on every restart across our team.
Asks
Either ship the src/ directory in the tarball alongside dist/ so the maps' sources resolve, or strip //# sourceMappingURL= comments from the published .js files (or inline the sourcesContent so external resolution isn't needed — the maps already include sourcesContent, so this should already work; happy to dig further if that's surprising).
Confirm whether @workflow/ai@4.1.2 is intended to track @workflow/core@4.2.4, or whether a synchronized 4.2.x release of @workflow/ai is coming.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Every
nitrodev build prints SWC sourcemap errors against four.jsfiles inside@workflow/ai/dist/(providers/anthropic.js,agent/durable-agent.js,agent/stream-text-iterator.js,agent/do-stream-step.js). Builds still succeed, but the noise is constant on every reload.Environment
@workflow/ai:4.1.2@workflow/core(peer):4.2.4(resolved by pnpm — note the minor split)ai:5.0.161zod:3.25.76nitro-devpreset, compatibility date2024-12-26)crates/swc/src/lib.rs:398Error output (representative)
Repeats for the four files listed above.
What I verified locally
The
.mapfiles are present and valid:.jssize.js.mapsize.mapvalid JSON?dist/providers/anthropic.jsdist/agent/durable-agent.jsdist/agent/stream-text-iterator.jsdist/agent/do-stream-step.jsEach
.jsends with//# sourceMappingURL=<name>.js.mapand the corresponding.mapparses with all expected keys (version,file,sources,mappings,sourcesContent).The
sourcesfield points at the TypeScript originals (e.g.../../src/providers/anthropic.ts), which are not included in the published tarball. That may be what SWC is actually complaining about even though the message says "find input source map file" — i.e. the map exists, but the upstream sources it references can't be resolved.Reproduction
@workflow/ai@4.1.2in a Nitro-based app (we hit this inapps/unified-api/runningpnpm dev:apithrough Turbo).Impact
Cosmetic — builds and the dev server still work. But it's noisy enough to drown out real errors and shows up on every restart across our team.
Asks
src/directory in the tarball alongsidedist/so the maps'sourcesresolve, or strip//# sourceMappingURL=comments from the published.jsfiles (or inline thesourcesContentso external resolution isn't needed — the maps already includesourcesContent, so this should already work; happy to dig further if that's surprising).@workflow/ai@4.1.2is intended to track@workflow/core@4.2.4, or whether a synchronized4.2.xrelease of@workflow/aiis coming.Beta Was this translation helpful? Give feedback.
All reactions