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
{{ message }}
Repository navigation
v0.2.52 crashes at startup on Node 18 (declared engines: node >=18) — puppeteer 25 is ESM-only #804
package.json declares "engines": { "node": ">=18.0.0" }, and manifest.template.json declares "runtimes": { "node": ">=18.0.0" }. However, the published v0.2.52 crashes at startup on Node 18, and several dependencies now require Node 20 or 22.
Repro (Node 18.20.8, Windows; the cause is platform-independent)
node_modules/md-to-pdf/dist/index.js:9
const puppeteer_1 = __importDefault(require("puppeteer"));
Error [ERR_REQUIRE_ESM]: require() of ES Module .../node_modules/puppeteer/lib/puppeteer/puppeteer.js ... not supported.
The server exits before answering initialize.
Cause
md-to-pdf@5.2.5 depends on puppeteer: ">=8.0.0", and nothing in DC pins puppeteer. The repo's lockfile has puppeteer 24.34.0, but npx and .mcpb installs don't use the lockfile, so they resolve puppeteer 25.x. Puppeteer 25 is ESM-only and declares engines: node >=22.12.0. md-to-pdf loads it with require(), which fails on Node 18 because Node 18 can't require() ES modules.
What I tested (fresh install with no lockfile, which is the npx/mcpb path)
Node
Server start + tools/list
md-to-pdf render
18.20.8
❌ crashes (ERR_REQUIRE_ESM)
❌
20.20.2
✅ 26 tools
✅ (works, though puppeteer 25 doesn't officially support Node 20)
22.23.3
✅
✅
Other packages above the declared minimum
@supabase/supabase-js@2.90.0 and its @supabase/* packages, plus iceberg-js@0.8.1, declare engines: node >=20.0.0. npm ci on Node 18 prints EBADENGINE for them. On Node 20, supabase-js logs that "Node.js 20 and below are deprecated".
In the repo's own test suite on Node 18/20, these fail on unmodified main (GitHub Actions, Ubuntu + macOS):
test-markdown-editor-roundtrip and test-markdown-editor-edit-diff fail with ReferenceError: navigator is not defined. prosemirror-view expects the global navigator, which Node only provides from v21.
test-remote-channel-reconnect fails on Node 18.
PDF reading logs TypeError: o.transferToFixedLength is not a function on Node 18/20, because pdf.js uses ArrayBuffer.prototype.transferToFixedLength, which needs Node 21+. Some page content may be lost.
sharp@0.35.x, the version that fixes the libvips advisories, requires Node >=20.9.0.
On Ubuntu with Node 22, all 67 test files pass. That's the version release.yml uses.
Options (maintainers' call)
Raise the declared minimum, in both engines and the manifest runtimes, to what actually works. That's at least >=20.19 (needed for require() of ESM), or >=22.12 to match puppeteer 25's declared support. This also unblocks the sharp bump.
Keep Node 18 support by pinning puppeteer to ^24 (for example as a direct dependency or through overrides). Note that puppeteer 24 also lacks the fix for the @puppeteer/browsers/extract-zip advisories, and the supabase packages already require Node 20.
Summary
package.jsondeclares"engines": { "node": ">=18.0.0" }, andmanifest.template.jsondeclares"runtimes": { "node": ">=18.0.0" }. However, the published v0.2.52 crashes at startup on Node 18, and several dependencies now require Node 20 or 22.Repro (Node 18.20.8, Windows; the cause is platform-independent)
npm init -y npm install @wonderwhy-er/desktop-commander@0.2.52 # resolves puppeteer 25.12.0 node node_modules/@wonderwhy-er/desktop-commander/dist/index.jsThe server exits before answering
initialize.Cause
md-to-pdf@5.2.5depends onpuppeteer: ">=8.0.0", and nothing in DC pins puppeteer. The repo's lockfile has puppeteer 24.34.0, but npx and.mcpbinstalls don't use the lockfile, so they resolve puppeteer 25.x. Puppeteer 25 is ESM-only and declaresengines: node >=22.12.0. md-to-pdf loads it withrequire(), which fails on Node 18 because Node 18 can'trequire()ES modules.What I tested (fresh install with no lockfile, which is the npx/mcpb path)
tools/listERR_REQUIRE_ESM)Other packages above the declared minimum
@supabase/supabase-js@2.90.0and its@supabase/*packages, plusiceberg-js@0.8.1, declareengines: node >=20.0.0.npm cion Node 18 printsEBADENGINEfor them. On Node 20, supabase-js logs that "Node.js 20 and below are deprecated".main(GitHub Actions, Ubuntu + macOS):test-markdown-editor-roundtripandtest-markdown-editor-edit-difffail withReferenceError: navigator is not defined.prosemirror-viewexpects the globalnavigator, which Node only provides from v21.test-remote-channel-reconnectfails on Node 18.TypeError: o.transferToFixedLength is not a functionon Node 18/20, because pdf.js usesArrayBuffer.prototype.transferToFixedLength, which needs Node 21+. Some page content may be lost.sharp@0.35.x, the version that fixes the libvips advisories, requires Node>=20.9.0.release.ymluses.Options (maintainers' call)
enginesand the manifestruntimes, to what actually works. That's at least>=20.19(needed forrequire()of ESM), or>=22.12to match puppeteer 25's declared support. This also unblocks thesharpbump.^24(for example as a direct dependency or throughoverrides). Note that puppeteer 24 also lacks the fix for the@puppeteer/browsers/extract-zipadvisories, and the supabase packages already require Node 20.Found while testing #516. That PR doesn't touch this: the same behaviour occurs on unmodified
main.