Closed oustr closed 8 months ago
Hello @oustr , The issue is related to another dependency "tippy" that is used by our designing library,
Anyways (that might fix it, not sure), This is a client-side library so to be able to use it from NextJS you should add 'use client' at the top of your component which uses the image editor, or dynamically load the component
Hello @oustr , The issue is related to another dependency "tippy" that is used by our designing library,
Anyways (that might fix it, not sure), This is a client-side library so to be able to use it from NextJS you should add 'use client' at the top of your component which uses the image editor, or dynamically load the component
Unfortunately, this solution did not solve the problem.
Try to reconfigure next.config.js like this (next latest 14 version):
module.exports = () => {
const nextConfig = {
transpilePackages: ['react-filerobot-image-editor', 'tippy.js'],
webpack: (config) => {
config.externals = [...config.externals, "canvas", "jsdom"];
return config;
}
};
return nextConfig;
};
Also use dynamic import of the component where the library is imported. It's help for me. I hope it's help for you.
Tried the React demo code in Nextjs, but
For more details:
Dependencies: