tiptap: Bug with build project after release v2.0.0-beta.212 (lodash/debounce issue)
After release v2.0.0-beta.212 corrupt build of my project. Update all tiptap packages to latest version not solve the problem.
ERROR in ./node_modules/@tiptap/extension-bubble-menu/dist/index.js 11:0-39 Module not found: Error: Can’t resolve ‘lodash/debounce’ in ‘/Users/vitaliy/Documents/domains/infusemedia.loc/node_modules/@tiptap/extension-bubble-menu/dist’ Did you mean ‘debounce.js’? BREAKING CHANGE: The request ‘lodash/debounce’ failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a ‘.mjs’ file, or a '.js’ file where the package.json contains ‘“type”: “module”’). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.
Which browser was this experienced in? Are any special extensions installed?
not depend on browser. error in webpack build or in tiptap dependency
How can we reproduce the bug on our side?
rm -rf node_modules
npm cache clean --force
npm i
// build the project
// in my case
npm run dev
### Can you provide a CodeSandbox?
_No response_
### What did you expect to happen?
expect build the project without error
### Anything to add? (optional)
_No response_
### 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. 💖
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 16
- Comments: 56 (12 by maintainers)
It would be beneficial to move away from semver (^2.0.0 equals to 2.X.X) which essentially leads to your own pinning of each extension being ignored
We’re also seeing the above lodash issue. Even when pinning to 213 (like
"@tiptap/react": "2.0.0-beta.213"- without the^) , Tiptap will still install at@tiptap/extension-bubble-menuat2.0.0-beta.215, which for us, has the lodash issue.We managed to temporarily (using Yarn) get around this by adding a resolution to package.json, which makes sure that no newer version of
@tiptap/extension-bubble-menuwill get installed.Would be great to find out what’s causing it on the newer builds though.
Thanks for trying out @ram-you - if some more people could verify that it’s working again on 217 would be great!
can’t work with tiptap since 209, the build crashes because of this lodash. The most intresting thing - I am not even using this bubble menu. It is just included in tiptap/vue package by default
I’ll release a fix asap
beta 217 does the trick for us, thanks!
Hi @bdbch , Have updated to beta.215 but still have error:
Named export 'debounce' not found. The requested module 'lodash' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'lodash'; const { debounce } = pkg;Occurs only when refresh page (server side rendering) .
@bdbch I have the same error. I try to use 209-216 versions but always get the error:
I need to release my app later today but I can’t even do a build as it always crashes on this error. Which older version can I still try to use so that my code works and the build does not crash?
Hi @bdbch , I’m also seeing this error in the next js after updating to beta.215.
Hey guys. Sorry for the inconvenience. I released a quick fix (beta.213) - would be nice if you could see if that works out for you.
Still unable to use the module. Getting this error on 216.
Same for me and it’s terrible. Didn’t expect that there is no stable version in the releases 😃
beta.216 still doesn’t let the react-admin simple example compile (see https://github.com/marmelab/react-admin/pull/8622#issuecomment-1423008220 for details)
Hi @bdbch , Have updated to beta.216 but have now an another error, this time the error message is:
The error occurs only when refresh page (server side rendering on NUXT), and when I put the component inside client-only, the error disappear:
Thank you.
@timheerwagen Just pushed another fix (beta.215) which should fix this issue
Installing with
npm install --save @tiptap/react @tiptap/pm @tiptap/starter-kitwith the new 2.0.0-beta.213 resolved the Lodash import issue for me.In my tests i have following error now:
This may also be related to this update.
can someone revert this buggy commit, please
I’ll close this issue for now. If anyone still has problems feel free to reopen or open a new ticket if it’s a new build issue.
Thanks
no wayy its not working again on
v2.0.0-beta.216Hi @zakkempson, I managed it using:
Because 213 version does not work for me. I am using NextJS 13.1.6, Typescript 4.9.5 and NodeJS 18.12.1 (LTS)
@nephew92 problem with resolve internal package solve as add package to package.json
or install manualy
but question with lodash/debounce is open