fix: declare @mat3ra/prode so the deployed bundle resolves it - #15
Merged
Merged
Conversation
https://mat3ra.github.io/wove/ rendered a blank page: the deployed main.js carried a bare `import ... from "@mat3ra/prode"`, which the browser rejects with "Failed to resolve module specifier", killing the whole module graph before anything mounts. prode reaches wove only as a peerDependency of @mat3ra/mode, and wove never declared it. Locally npm installs peers, so Vite resolved and bundled it and the page worked. The deploy-bundle job installs with --legacy-peer-deps, which skips peers entirely — prode was absent, Vite left the specifier unresolved, and the bundle shipped broken. Declaring it (devDependencies pinned like its siblings, peerDependencies "*" like the other @mat3ra runtime packages) makes the install independent of that flag. The reason this reached production green: an unresolved bare import is only a Rollup *warning*, so the build reported success while emitting a bundle that cannot execute. rollupOptions.onwarn now throws on UNRESOLVED_IMPORT, so the next occurrence fails the build instead of the page. Reproduced and verified against CI's exact install: with --legacy-peer-deps and no declaration, the build now fails with the guard's message; with the declaration, prode 2026.8.18-0 installs, the bundle contains no bare imports, and the built page renders in a browser with no errors (57 standata workflows, unit cards, chips, flowchart). tsc, 43 tests and the library build all pass. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H3qj13tVSuzTFc3qsFzBbE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://mat3ra.github.io/wove/renders a blank page. The deployedmain.jscarries a bareimport ... from "@mat3ra/prode", which the browser rejects with "Failed to resolve module specifier", killing the module graph before anything mounts.Why it broke
@mat3ra/prodereaches wove only as a peerDependency of@mat3ra/mode, and wove never declared it itself. Locallynpm installpulls peers in, so Vite resolved and bundled prode and the page worked — which is why this passed every local check. Thedeploy-bundlejob installs withnpm install --legacy-peer-deps, which skips peers entirely, so prode was absent, Vite left the specifier unresolved, and the broken bundle shipped.Why CI stayed green while shipping it
An unresolved bare import is only a Rollup warning. The build reported success and emitted a bundle that cannot execute.
rollupOptions.onwarnnow throws onUNRESOLVED_IMPORT, so the next occurrence fails the build instead of the page.The fix
Declare
@mat3ra/prode—devDependenciespinned to2026.8.18-0like its siblings,peerDependenciesas"*"like the other@mat3raruntime packages — so the install no longer depends on peer auto-installation.Verification
Reproduced against CI's exact install (
npm install --legacy-peer-deps):from"@mat3ra/prode"→ deployed page blank. Confirmed by running the downloaded live artifacts in a browser, which reproduced the exact console error."@mat3ra/prode" ... could not be resolved / Declare it in package.json so the bundle includes it.and emits no bundle.2026.8.18-0installs under the same flags, the bundle has no bare imports, and the built page renders in a browser with no page errors — 57 standata workflows, unit cards, application chips, flowchart.tsc, 43 tests, and the library build all pass. The lockfile diff is 5 lines: the two declarations plus the prode version bump.🤖 Generated with Claude Code
https://claude.ai/code/session_01H3qj13tVSuzTFc3qsFzBbE
Generated by Claude Code