Runtime Error: Module not found: Can't resolve '@tiptap/core'
I am running into a build error when using `@fuma-comment/react` in a Next.js project. The error indicates that `@tiptap/core` cannot be resolved, even though it is required by the package.
**Error Output:**
```
Module not found: Can't resolve '@tiptap/core'
> 1 | import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
Additional error trace:
```
Export Extension doesn't exist in target module
Did you mean useCurrentEditor?
The requested export doesn't exist.
```
**Environment:**
* Next.js: 15.5.0 (Turbopack)
* Node.js: v22.15.1
* `@fuma-comment/react`: 1.3.0
**Steps to Reproduce:**
1. Install `@fuma-comment/react`
2. Import and use it in a Next.js (15.5.0 with Turbopack) project
3. Run the dev server
4. See error
**Expected Behavior:**
The package should correctly resolve `@tiptap/core` and other required exports without requiring manual installation.
**Screenshot:**
<img width="1845" height="930" alt="Image" src="https://github.com/user-attachments/assets/cfda63a0-bf50-4a33-a354-c17dbf1aef93" />
**Possible Cause:**
It looks like `@tiptap/core` and other Tiptap dependencies may not be listed as peerDependencies or dependencies in `@fuma-comment/react`.
**Workaround Tried:**
Manually installing `@tiptap/core` and `@tiptap/react` reduces some errors, but missing exports (`Extension`, `Editor`) still cause build failures.
0 条评论