Skip to content

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

Description

@abdallhsamy

Describe the bug
Build Fail

To Reproduce
run command

npm run build

Misc

  • Node version: v21.6.2
  • Package manager: NPM (10.2.4)
  • Browser: any
(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 :

  • package.json
{
    "name": "my-app",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start",
        "lint": "next lint"
    },
    "dependencies": {
        "@blocknote/core": "^0.14.2",
        "@blocknote/mantine": "^0.14.2",
        "@blocknote/react": "^0.14.2",
        "@emotion/react": "^11.10.6",
        "@fullcalendar/core": "^6.1.4",
        "@fullcalendar/daygrid": "^6.1.4",
        "@fullcalendar/interaction": "^6.1.1",
        "@fullcalendar/react": "^6.1.4",
        "@fullcalendar/timegrid": "^6.1.1",
        "@headlessui/react": "^1.7.8",
        "@hookform/resolvers": "^3.6.0",
        "@mantine/core": "^5.10.5",
        "@mantine/hooks": "^5.10.5",
        "@reduxjs/toolkit": "^1.9.1",
        "@tippyjs/react": "^4.2.6",
        "@types/axios": "^0.14.0",
        "@types/node": "^18.11.18",
        "@types/react": "^18.0.27",
        "@types/react-dom": "18.0.10",
        "react-flatpickr": "^3.10.13",
        "axios": "^1.7.2",
        "clsx": "^2.1.1",
        "eslint": "8.32.0",
        "eslint-config-next": "13.1.2",
        "i18next": "^22.4.10",
        "mantine-datatable": "^1.7.35",
        "moment": "^2.30.1",
        "next": "14.0.3",
        "ni18n": "^1.0.5",
        "react": "18.2.0",
        "react-animate-height": "^3.1.0",
        "react-dom": "18.2.0",
        "react-hook-form": "^7.52.0",
        "react-images-uploading": "^3.1.7",
        "react-i18next": "^12.1.5",
        "react-icons": "^5.2.1",
        "react-organizational-chart": "^2.2.1",
        "react-perfect-scrollbar": "^1.5.8",
        "react-popper": "^2.3.0",
        "react-quill": "^2.0.0",
        "react-redux": "^8.1.3",
        "react-select": "^5.7.0",
        "react-sortablejs": "^6.1.4",
        "sweetalert2": "^11.7.1",
        "sweetalert2-react-content": "^5.0.7",
        "typescript": "^4.9.4",
        "universal-cookie": "^6.1.1",
        "yup": "^0.32.11"
    },
    "devDependencies": {
        "@tailwindcss/forms": "^0.5.3",
        "@tailwindcss/typography": "^0.5.8",
        "@types/lodash": "^4.14.191",
        "@types/react-flatpickr": "^3.8.8",
        "@types/react-redux": "^7.1.32",
        "autoprefixer": "^10.4.17",
        "postcss": "^8.4.35",
        "prettier": "^2.8.0",
        "prettier-plugin-tailwindcss": "^0.2.0",
        "tailwindcss": "^3.4.1"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions