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
Named export 'memoize' not found. The requested module 'lodash' is a CommonJS module // @imgly/background-removal-node #78
Comments
try |
i'm stuck with this same issue, you fix it? (i'm trying to use this library in a NextJs project) |
We will check this out. Which version are you using? |
|
Hey Daniel! I am also encountering this issue and would love to help you out for testing new versions. I'm using version 1.2.1 with Next.js("13.5.6"). Initially, it appeared to work, but then I ran into the It seems to be a recurring issue with Next.js projects. Any insights or solutions would be greatly appreciated. |
@RobSchilderr Can you send or post a zip that includes a project that can reproduce this error? |
I'd love to but don't have the time in the coming week, maybe the week later. Don't you have a test repo with Next.js? If you can confirm it works with Next.js then I have to debug the issue more deeply |
I'm having the same error in sveltekit (version 1.3.0 using the import from the readme). Attached is the zip from https://github.com/rikharink/pfp.toi.vet/tree/local_models that should reproduce this. (removed the modals and wasms from /static to keep the size of the zip small) |
@DanielHauschildt is this enough or do you also need my example? |
@DanielHauschildt Facing the same issue in Nextjs. Here's the version of the package- Is there a workaround for this? |
this works for me on nuxt
|
After reading the previous comments this was my work around in my sveltekit project. I imported from to |
#73 < If i apply this fix to the web variant that I use it also seems to work. |
this worked on sveltekit for me aswell |
Could we not change -- Edit: Changing this locally instantly fixed the |
Hello, I get this error when I try to use the library:
file:///C:/Users/simon/BetterhostApi-1/node_modules/@imgly/background-removal-node/dist/index.mjs:402
import { memoize } from "lodash";
^^^^^^^
SyntaxError: Named export 'memoize' 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 { memoize } = pkg;
Node.js v21.1.0
The text was updated successfully, but these errors were encountered: