Repository navigation
fix(docs): resolve every comark dependency to the workspace - #561
Conversation
comark-docs, comark-content and nuxt-agent-discovery depend on the published comark 0.8.1 (markdown-exit 1.3). Nitro inlines both comark copies into one server bundle, where they share a single top-level markdown-exit 2.1 that has no dist/index.js in its trace, so the deployed docs crash with ERR_MODULE_NOT_FOUND. Override comark, @comark/nuxt and @comark/vue to workspace:*.
|
Note Nothing here is code, only docs, data or images, so PR Lens left this pull request undrawn. Comment
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
comark
@comark/angular
@comark/ansi
@comark/html
@comark/nuxt
@comark/react
@comark/svelte
@comark/vue
commit: |
Merging this PR will not alter performance1 warning
Comparing |
Problem
Since #549, the deployed docs crash on boot:
Reproduced locally with
NITRO_PRESET=vercel pnpm --filter comark-docs-site buildand importing.vercel/output/functions/__fallback.func/index.mjs.Cause
Two comark copies end up in the docs server bundle:
comark(markdown-exit 2.1, importsmarkdown-exit/core)comark@0.8.1(markdown-exit 1.3, importsmarkdown-exit), pulled in by thecomark-docslayer,comark-contentandnuxt-agent-discoveryNitro inlines comark (
externals.inline), so both copies' bare imports resolve against the single top-levelnode_modules/markdown-exitin the function output. That symlink points at 2.1.0, whose trace only keptdist/core.js— so the old copy'simport MarkdownExit from 'markdown-exit'fails at runtime.Fix
Add pnpm
overridessocomark,@comark/nuxtand@comark/vuealways resolve toworkspace:*. The docs site then ships one comark (the one it documents) and one markdown-exit.Verification
pnpm why comark: every consumer (layer, comark-content, nuxt-agent-discovery) links topackages/comarkmarkdown-exit/core;node_modules/.nitrohas onlymarkdown-exit@2.1.0import('./index.mjs')on the function output loads (it threwERR_MODULE_NOT_FOUNDbefore)pnpm typecheckandpnpm lintpassIndependent of #560.
Summary by CodeRabbit