Skip to content

[Bug]: SyntaxError: The requested module '@tiptap/core' does not provide an export named 'canInsertNode' #1774

Open

Description

@salaarkhan-dev

Contact Details

No response

What happened?

  • Installed a fresh app using cli tool and when I start the project it is giving
Details

node_modules/.pnpm/@tiptap+extension-horizonta_22a8c1c41006f67265f459342f8db8b5/node_modules/@tiptap/extension-horizontal-rule/dist/index.js:1
import { Node, mergeAttributes, canInsertNode, isNodeSelection, nodeInputRule } from '@tiptap/core';
^^^^^^^^^^^^^
SyntaxError: The requested module '@tiptap/core' does not provide an export named 'canInsertNode'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:182:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:266:5)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:644:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

Node.js v22.16.0

Bug prevalence

Starting after fresh install

AdminJS dependencies version

"dependencies": {
"adminjs": "^7.7.2",
"@adminjs/express": "^6.1.0",
"@adminjs/nestjs": "^6.1.0",
"express-formidable": "^1.2.0",
"express-session": "^1.17.3",
},

What browsers do you see the problem on?

No response

Relevant log output

import { Node, mergeAttributes, canInsertNode, isNodeSelection, nodeInputRule } from '@tiptap/core';
                                ^^^^^^^^^^^^^
SyntaxError: The requested module '@tiptap/core' does not provide an export named 'canInsertNode'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:182:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:266:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:644:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

Node.js v22.16.0

Relevant code that's giving you issues

Activity

  1. added
    bug
    on Jul 24, 2025
  2. saifsweelam commented on Jul 25, 2025

    @saifsweelam

    I'm facing the same problem. It makes me unable to use AdminJS

  3. salaarkhan-dev commented on Jul 26, 2025

    @salaarkhan-dev
    Author

    I'm facing the same problem. It makes me unable to use AdminJS

    I fixed that by manually installing the required package:

    pnpm add @tiptap/extension-horizontal-rule@2.1.13

  4. japsimrans13 commented on Oct 22, 2025

    @japsimrans13

    I'm facing the same problem. It makes me unable to use AdminJS

    I fixed that by manually installing the required package:

    pnpm add @tiptap/extension-horizontal-rule@2.1.13

    Worked for me. Thanks :)

  5. taufikmuharrom commented on Nov 4, 2025

    @taufikmuharrom

    @tiptap/extension-horizontal-rule@2.1.13

    its working! thank you

  6. RitvikSardana commented on Nov 7, 2025

    @RitvikSardana

    What worked for me was:

    1. delete yarn.lock
    2. yarn cache clean
    3. yarn install
  7. docentYT commented on Feb 13, 2026

    @docentYT

    I am using bun and I encountered the same bug. No fixes work.

  8. johncip commented on Aug 1, 2026

    @johncip

    I've hit this in a fresh adminjs project. I think fixing will require adminjs to bump core & starter-kit to 2.22.3, which seems to have been when canInsertNode was added.

    This is what I'm seeing:

    • @adminjs/design-system@4.1.1 pins @tiptap/core (and @tiptap/starter-kit) at exactly 2.1.13
    • @tiptap/starter-kit includes extension packages with a looser ^2.1.13 range, and they will get installed at the newest matching release, which for me was 2.27.2.
    • extension-horizontal-rule@2.27.2 expects canInsertNode from @tiptap/core, which doesn't exist yet in 2.1.13.

    I'd also guess that this affects all fresh installs of adminjs since mid-2025. If that's right, then even though there's a workaround (as @salaarkhan-dev said, override @tiptap/extension-horizontal-rule to be < 2.22.3), the bug itself is probably high-impact.

    Notes on canInsertNode's addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions