tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

extension_table_1.default.configure is not a function

Open hilalbuyukgullu opened this issue 2 years ago • 7 comments

What’s the bug you are facing?

I have a component library. There is no problem with the resizable table in this library. However, I am getting this error in projects where I have installed this library. This time when I remove the table config I get the textAlign config error

image

image

image

Which browser was this experienced in? Are any special extensions installed?

I am getting the same error in all browsers.

How can we reproduce the bug on our side?

I installed Tiptap in my own component library and it's ok. But when I add my own library in other projects I get an error

Can you provide a CodeSandbox?

What did you expect to happen?

I expected no errors.

Anything to add? (optional)

Did you update your dependencies?

  • [x] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [ ] Yes, I’m a sponsor. 💖

hilalbuyukgullu avatar Feb 21 '23 15:02 hilalbuyukgullu

I had a similar problem. You set dependencies to fixed versions, but @tiptap packages themselves specify their sibling dependencies versions with ^ prefix. Check if, for example, node_modules/@tipta/starter-kit has it's own node_modules and if it'd installed duplicate versions of your other packages such as @tiptap/core but higher versions than yours (ie beta.220). If yes you can fix this by specifying resolutions in your package.json, this is mine:

  "resolutions": {
    "@tiptap/core": "2.0.0-beta.217",
    "@tiptap/extension-bubble-menu": "2.0.0-beta.217",
    "@tiptap/extension-character-count": "2.0.0-beta.217",
    "@tiptap/extension-code": "2.0.0-beta.217",
    "@tiptap/extension-document": "2.0.0-beta.217",
    "@tiptap/extension-floating-menu": "2.0.0-beta.217",
    "@tiptap/extension-heading": "2.0.0-beta.217",
    "@tiptap/extension-image": "2.0.0-beta.217",
    "@tiptap/extension-link": "2.0.0-beta.217",
    "@tiptap/extension-table": "2.0.0-beta.217",
    "@tiptap/extension-table-cell": "2.0.0-beta.217",
    "@tiptap/extension-table-header": "2.0.0-beta.217",
    "@tiptap/extension-table-row": "2.0.0-beta.217",
    "@tiptap/extension-text": "2.0.0-beta.217",
    "@tiptap/extension-text-align": "2.0.0-beta.217",
    "@tiptap/extension-typography": "2.0.0-beta.217",
    "@tiptap/pm": "2.0.0-beta.217",
    "@tiptap/react": "2.0.0-beta.217",
    "@tiptap/starter-kit": "2.0.0-beta.217"
  }

After you do this, reinstall your node_modules. Also, if you're locking a version I suggest setting resolutions for all tiptap packages, even the ones you don't use yourself, since they're made to be compatible with matching versions and starter kit installs a lot of packages on it's own... This is quite messy but managable.

dziraf avatar Mar 01 '23 09:03 dziraf

Same issue and tried to lockdown the resolutions but doesn't work.

This issue only happens on CommonJS bundles (related to https://github.com/ueberdosis/tiptap/issues/1580 and https://github.com/ueberdosis/tiptap/issues/1545), my workaround is include @tiptap/* in bundles.

robertu7 avatar Mar 24 '23 04:03 robertu7

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jun 23 '23 00:06 github-actions[bot]

Same error over here.

walterdl avatar Jul 07 '23 14:07 walterdl

@hilalbuyukgullu you got any solution for this. i am also facing same issue when i create a component in my design system. i am using babel for build process and create react app setup

yashug avatar Mar 27 '24 09:03 yashug

Same issue here

james-bowers avatar Jul 18 '24 12:07 james-bowers

Is this still an issue? I think that named & default exports should work fine?

nperez0111 avatar Jul 26 '24 19:07 nperez0111