Skip to content
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

[Bug]: @tiptap/extension-text-style is suddenly required in 2.8.0 #5707

Closed
1 task done
Nantris opened this issue Oct 9, 2024 · 6 comments · Fixed by #5756
Closed
1 task done

[Bug]: @tiptap/extension-text-style is suddenly required in 2.8.0 #5707

Nantris opened this issue Oct 9, 2024 · 6 comments · Fixed by #5756
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@Nantris
Copy link
Contributor

Nantris commented Oct 9, 2024

Affected Packages

extension-bullet-list

Version(s)

2.8.0

Bug Description

Uncaught Error: Cannot find module '@tiptap/extension-text-style'

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

No new dependencies are needed, or if they are they are automatically managed.

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@Nantris Nantris added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Oct 9, 2024
@yroc92
Copy link

yroc92 commented Oct 9, 2024

Also seeing this. Here's our error (nextjs):

Module not found: Can't resolve '@tiptap/extension-text-style'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../node_modules/@tiptap/starter-kit/dist/index.js

When I install that package, I then get OP's dependency error:

Error: Module not found: Can't resolve '@tiptap/extension-text-style'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../node_modules/@tiptap/starter-kit/dist/index.js

@bbaappss
Copy link

Yup, same..

Had to do this

image

But that only works on local, not sure if I can get this to my production..

@guanriyue
Copy link

The following diff is the relevant changes.

6834a7f#diff-bc4c95e6db01b15dbca4d9271aec52b402faf0c9a0d5a1d02aaf14cf87056a60

The way packages were referenced in the past code was "wrong". @tiptap/extension-ordered-list has the same problem

The code changes from import TextStyle from '../../extension-text-style/src/index.js' to import { TextStyle } from '@tiptap/extension-text-style'.

In this change, @tiptap/extension-text-style is added as peerDeps, which means you have to add the dependency manually.

This looks like a breaking change.

@Nantris
Copy link
Contributor Author

Nantris commented Oct 12, 2024

So I guess it should just be a dependency instead of a peerDependency, yeah?

@guanriyue
Copy link

Yes, you are right.

@nperez0111
Copy link
Contributor

This is released with v2.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
5 participants