-
-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlockNoteView component expects at least '5' arguments, but the JSX factory 'React.createElement' provides at most '2' #1211
Comments
I also tried adding Blocknote to this project of mine and I'm seeing the same bug :/ This project has much more recent versions of NextJS, React, etc. fwiw |
And sorry to blow this thread up but more experimentation - I installed my ListRocket project fresh on a different machine, yarn'd, etc. in my If I TS Ignore that and try to build, then it gets stuck on a different error:
|
You seem to be on a fairly old version of typescript. Could you try
upgrading?
…On Sun, 3 Nov 2024 at 06:27, Branon Eusebio ***@***.***> wrote:
And sorry to blow this thread up but more experimentation - I installed my
ListRocket project fresh on a different machine, yarn'd, etc. in my
blocknote branch and now I see the type error as listed above^ in the
screenshot. editor field doesn't exist on the BlockNoteView component.
If I TS Ignore that and try to build, then it gets stuck on a different
error:
PS C:\Users\brano\code\list-rocket2> yarn build
yarn run v1.22.22
$ next build
info - Loaded env from C:\Users\brano\code\list-rocket2\.env
Failed to compile.
.***@***.***/react/types/src/schema/ReactBlockSpec.d.ts:21:46
Type error: Type parameter declaration expected.
19 | children: ReactNode;
20 | }): import("react/jsx-runtime").JSX.Element;
> 21 | export declare function createReactBlockSpec<const T extends CustomBlockConfig, const I extends InlineContentSchema, const S extends StyleSchema>(blockConfig: T, blockImplementation: ReactCustomBlockImplementation<T, I, S>): {
| ^
22 | config: T;
23 | implementation: ***@***.***/core").TiptapBlockImplementation<T, any, InlineContentSchema, StyleSchema>;
24 | };
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
—
Reply to this email directly, view it on GitHub
<#1211 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2BWPQEMPC4YGBLZSDLC3Z6WX5BAVCNFSM6AAAAABRCGGESGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGMYDEOBZHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for taking a look so quickly @YousefED ! 🙏 I bumped TS in my project to |
you shouldn't need to |
facing the same error
|
"dependencies": { |
Thanks, and the code you’re trying?
…On Wed, 11 Dec 2024 at 08:09, Singular Singularity ***@***.***> wrote:
"dependencies": {
***@***.***/core": "^0.20.0",
***@***.***/mantine": "^0.20.0",
***@***.***/react": "^0.20.0",
***@***.***/nextjs": "^6.9.0",
***@***.***/resolvers": "^3.9.1",
***@***.***/react-accordion": "^1.2.1",
***@***.***/react-alert-dialog": "^1.1.2",
***@***.***/react-aspect-ratio": "^1.1.0",
***@***.***/react-avatar": "^1.1.1",
***@***.***/react-checkbox": "^1.1.2",
***@***.***/react-dialog": "^1.1.2",
***@***.***/react-dropdown-menu": "^2.1.2",
***@***.***/react-label": "^2.1.0",
***@***.***/react-navigation-menu": "^1.2.1",
***@***.***/react-progress": "^1.1.0",
***@***.***/react-select": "^2.1.2",
***@***.***/react-separator": "^1.1.0",
***@***.***/react-slot": "^1.1.0",
***@***.***/react-tabs": "^1.1.1",
***@***.***/react-toast": "^1.2.2",
***@***.***/react-tooltip": "^1.1.4",
***@***.***/react-table": "^8.20.5",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"convex": "^1.17.3",
"date-fns": "^4.1.0",
"embla-carousel-react": "^8.5.1",
"lucide-react": "^0.468.0",
"next": "15.1.0",
"next-themes": "^0.4.4",
"query-string": "^9.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hook-form": "^7.54.0",
"sonner": "^1.7.1",
"stripe": "^17.4.0",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7",
"usehooks-ts": "^3.1.0",
"zod": "^3.24.1",
"zustand": "^5.0.2"
},
"devDependencies": {
***@***.***/node": "^22.10.1",
***@***.***/react": "^19.0.1",
***@***.***/react-dom": "^19.0.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.16.0",
"eslint-config-next": "15.1.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2"
}
—
Reply to this email directly, view it on GitHub
<#1211 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2BWMFX3T7LOSPVHVBPV32E7QIZAVCNFSM6AAAAABRCGGESGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZTHA2DMNJSGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
basic example found in the docs |
pretty sure it has smth to do with exporting the prop editor and its type |
closed by #1316 |
Describe the bug
When pulling latest Blocknote into my project and slapping in a
BlockNoteView
component like the examples on the docs, I get a linter warning that says 'BlockNoteView expects at least '5' arguments, but the JSX factory 'React.createElement' provides at most '2'.Interestingly as well, when pushing to Vercel for deployment I get a completely different build error, around a TS problem where the
editor
prop apparently doesn't exist at all on theBlockNoteView
component 🤔To Reproduce
Pull latest Blocknote, create a simple component like the docs, and render a BlockNoteView component with the editor prop.
My project is here, for reference with its configurations/etc: https://github.com/BranonConor/list-rocket
This is the BlockNote editor component I created here.
Screenshot of the warning
Misc
The text was updated successfully, but these errors were encountered: