Build error with @blocknote/server-util (local dev)
I need to run the following function in an action:
I get the following error:
The file where the action is declared is marked with "use node" directive.
How do I make it work? Thanks.
import { ServerBlockNoteEditor } from "@blocknote/server-util";
async function mdToBlocks(md: string) {
const editor = ServerBlockNoteEditor.create();
return await editor.tryParseMarkdownToBlocks(md);
}import { ServerBlockNoteEditor } from "@blocknote/server-util";
async function mdToBlocks(md: string) {
const editor = ServerBlockNoteEditor.create();
return await editor.tryParseMarkdownToBlocks(md);
}I get the following error:
✖ Error fetching POST http://127.0.0.1:3210/api/deploy2/start_push 400 Bad Request: InvalidModules: Hit an error while pushing:
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze documentProcessing.js: Cannot find module './xhr-sync-worker.js'
Require stack:
- /var/folders/w6/z0sxl_zd06v2qdqn9mj0k2z40000gn/T/.tmp5IOhGh/source/f7a02a56-a276-4817-8a44-a4c2828aeac8/modules/_deps/node/25VZDILB.js
at <anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:36:2)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)
at <anonymous> (../node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js:654:13)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)
at <anonymous> (../node_modules/jsdom/lib/jsdom/living/interfaces.js:170:13)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)
at <anonymous> (../node_modules/jsdom/lib/jsdom/browser/Window.js:32:8)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)✖ Error fetching POST http://127.0.0.1:3210/api/deploy2/start_push 400 Bad Request: InvalidModules: Hit an error while pushing:
Loading the pushed modules encountered the following
error:
Uncaught Failed to analyze documentProcessing.js: Cannot find module './xhr-sync-worker.js'
Require stack:
- /var/folders/w6/z0sxl_zd06v2qdqn9mj0k2z40000gn/T/.tmp5IOhGh/source/f7a02a56-a276-4817-8a44-a4c2828aeac8/modules/_deps/node/25VZDILB.js
at <anonymous> (../node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:36:2)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)
at <anonymous> (../node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js:654:13)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)
at <anonymous> (../node_modules/jsdom/lib/jsdom/living/interfaces.js:170:13)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)
at <anonymous> (../node_modules/jsdom/lib/jsdom/browser/Window.js:32:8)
at <anonymous> (convex:/user/_deps/node/V7X2J7BI.js:13:31)The file where the action is declared is marked with "use node" directive.
How do I make it work? Thanks.
