TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
5.91k stars 386 forks source link

Can not build nextjs app after installing blocknote.js #901

Closed abdallhsamy closed 1 day ago

abdallhsamy commented 4 days ago

Describe the bug Build Fail

To Reproduce run command

npm run build

Misc


(node:42644) [DEP_WEBPACK_MODULE_UPDATE_HASH] DeprecationWarning: Module.updateHash: Use new ChunkGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
 ✓ Creating an optimized production build
 ✓ Compiled successfully
   Skipping linting
   Checking validity of types  ..Failed to compile.

./node_modules/@blocknote/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: import("@blocknote/core").TiptapBlockImplementation<T, any, InlineContentSchema, StyleSchema>;
  24 | };

may help :

marcoancona commented 4 days ago

See same, but managed to solve upgrading to Typescript 5

YousefED commented 1 day ago

Indeed, this can be fixed by upgrading to the latest TS version

abdallhsamy commented 10 hours ago

Thanks all , upgrading Typescript solved my issue