Closed alfirus closed 3 months ago
Please check https://www.blocknotejs.org/docs/advanced/nextjs :)
my nextjs crashes anytime I run npm run build
.
my nextjs is 14.2.5 and I'm getting similar error.
Generating static pages (1/14) [= ]ReferenceError: document is not defined
Describe the bug I'm using code from https://www.blocknotejs.org/docs/quickstart and place it inside my /app/departments/humanresource/memos/add.
When I try to "npm run build", i'll get
`Error occurred prerendering page "/departments/humanresource/memos/add". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: document is not defined`
To Reproduce This is my code `'use client'; import React, { useState } from 'react'; import UserData from '@/components/UserData'; import axios from 'axios'; import '@blocknote/core/fonts/inter.css'; import { useCreateBlockNote } from '@blocknote/react'; import { BlockNoteView } from '@blocknote/mantine'; import '@blocknote/mantine/style.css';
export default function MemoPage() { const editor = useCreateBlockNote();
} `
Misc