pltoledo
pltoledo2mo ago

Prosemirror sync errors

I've been trying to integrate the prosemirror sync component into my app, but I can't seem to make it work. I've encountered the following error:
[vite] Internal server error: Directory import '/Users/pltoledo/projects/psynotes/node_modules/.pnpm/@convex-dev+prosemirror-sync@0.1.20_@tiptap+core@3.0.1_@tiptap+pm@3.0.1__@types+hast@3._529f733ea364bd14324ab9d624ca38be/node_modules/@convex-dev/prosemirror-sync/dist/esm/tiptap' is not supported resolving ES modules imported from /Users/pltoledo/projects/psynotes/node_modules/.pnpm/@convex-dev+prosemirror-sync@0.1.20_@tiptap+core@3.0.1_@tiptap+pm@3.0.1__@types+hast@3._529f733ea364bd14324ab9d624ca38be/node_modules/@convex-dev/prosemirror-sync/dist/esm/blocknote/index.js

at finalizeResolution (node:internal/modules/esm/resolve:263:11)
at moduleResolve (node:internal/modules/esm/resolve:860:10)
at defaultResolve (node:internal/modules/esm/resolve:984:11)
at nextResolve (node:internal/modules/esm/hooks:748:28)
at o (file:///Users/pltoledo/projects/psynotes/node_modules/.pnpm/@tailwindcss+node@4.1.11/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs:1:69)
at nextResolve (node:internal/modules/esm/hooks:748:28)
at Hooks.resolve (node:internal/modules/esm/hooks:240:30)
at handleMessage (node:internal/modules/esm/worker:199:24)
at Immediate.checkForMessages (node:internal/modules/esm/worker:141:28)
at process.processImmediate (node:internal/timers:505:21)
[vite] Internal server error: Directory import '/Users/pltoledo/projects/psynotes/node_modules/.pnpm/@convex-dev+prosemirror-sync@0.1.20_@tiptap+core@3.0.1_@tiptap+pm@3.0.1__@types+hast@3._529f733ea364bd14324ab9d624ca38be/node_modules/@convex-dev/prosemirror-sync/dist/esm/tiptap' is not supported resolving ES modules imported from /Users/pltoledo/projects/psynotes/node_modules/.pnpm/@convex-dev+prosemirror-sync@0.1.20_@tiptap+core@3.0.1_@tiptap+pm@3.0.1__@types+hast@3._529f733ea364bd14324ab9d624ca38be/node_modules/@convex-dev/prosemirror-sync/dist/esm/blocknote/index.js

at finalizeResolution (node:internal/modules/esm/resolve:263:11)
at moduleResolve (node:internal/modules/esm/resolve:860:10)
at defaultResolve (node:internal/modules/esm/resolve:984:11)
at nextResolve (node:internal/modules/esm/hooks:748:28)
at o (file:///Users/pltoledo/projects/psynotes/node_modules/.pnpm/@tailwindcss+node@4.1.11/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs:1:69)
at nextResolve (node:internal/modules/esm/hooks:748:28)
at Hooks.resolve (node:internal/modules/esm/hooks:240:30)
at handleMessage (node:internal/modules/esm/worker:199:24)
at Immediate.checkForMessages (node:internal/modules/esm/worker:141:28)
at process.processImmediate (node:internal/timers:505:21)
It looks like a build error. Can someone from the team help?
2 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
pltoledo
pltoledoOP2mo ago
Update: got it working by adding this to my vite.config.ts:
import path from "node:path";
import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
// other configs
ssr: {
noExternal: ["@convex-dev/prosemirror-sync"],
},
optimizeDeps: {
include: ["@convex-dev/prosemirror-sync"],
force: true,
},
});
import path from "node:path";
import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
// other configs
ssr: {
noExternal: ["@convex-dev/prosemirror-sync"],
},
optimizeDeps: {
include: ["@convex-dev/prosemirror-sync"],
force: true,
},
});
As you can see I am also using RR7. Now I got this error while trying to render the component:
proseMirrorPlugins is not iterable (cannot read property undefined)

TypeError: proseMirrorPlugins is not iterable (cannot read property undefined)
at http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:1202:17
at Array.map (<anonymous>)
at get plugins (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:1169:35)
at We2.createViewAlternative (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:28107:38)
at We2.mount (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:27985:45)
at _ao.mount (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:28166:26)
at http://localhost:5173/node_modules/.vite/deps/chunk-KDWIGYWQ.js?v=3bc11ba0:10591:9
at commitAttachRef (http://localhost:5173/node_modules/.vite/deps/chunk-X3GQLELX.js?v=3bc11ba0:8630:63)
at runWithFiberInDEV (http://localhost:5173/node_modules/.vite/deps/chunk-X3GQLELX.js?v=3bc11ba0:1485:72)
at safelyAttachRef (http://localhost:5173/node_modules/.vite/deps/chunk-X3GQLELX.js?v=3bc11ba0:8644:11)
proseMirrorPlugins is not iterable (cannot read property undefined)

TypeError: proseMirrorPlugins is not iterable (cannot read property undefined)
at http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:1202:17
at Array.map (<anonymous>)
at get plugins (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:1169:35)
at We2.createViewAlternative (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:28107:38)
at We2.mount (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:27985:45)
at _ao.mount (http://localhost:5173/node_modules/.vite/deps/chunk-64X3B6TC.js?v=3bc11ba0:28166:26)
at http://localhost:5173/node_modules/.vite/deps/chunk-KDWIGYWQ.js?v=3bc11ba0:10591:9
at commitAttachRef (http://localhost:5173/node_modules/.vite/deps/chunk-X3GQLELX.js?v=3bc11ba0:8630:63)
at runWithFiberInDEV (http://localhost:5173/node_modules/.vite/deps/chunk-X3GQLELX.js?v=3bc11ba0:1485:72)
at safelyAttachRef (http://localhost:5173/node_modules/.vite/deps/chunk-X3GQLELX.js?v=3bc11ba0:8644:11)

Did you find this page helpful?