cloudinary / cloudinary/js-url-gen

Unable to resolve 'lodash/cloneDeep' import

Open
#421 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
55
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Not sure if this bug is caused by my setup or how module resolution works in node (it seems like this is an unclear area), so apologies if this is a false report.

But when I try to use @cloudinary/base in my Next.js project, I get an error about failing to resolve `lodash/cloneDeep`, and then indeed I see that various places import it like `lodash/cloneDeep`: https://github.com/cloudinary/cloudinary-js-base/search?q=lodash%2FcloneDeep

but in the package dependencies, it is written as `lodash.cloneDeep`. Should this be switched to `import cloneDeep from 'lodash.cloneDeep';`?

I monkey-patched the files locally and changing the import statements to `lodash.cloneDeep` fixed the issue. I also was able to get the package working locally by just installing `lodash` to my whole project.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.