Unable to resolve 'lodash/cloneDeep' import
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, next.js, node.js
- Domain
- tooling
Research direction
Inspect the package dependency declaration and the import sites identified by the lodash/cloneDeep search link. Reproduce the unresolved import in a Next.js project, then verify that the dependency declaration and import path agree and that the package resolves without requiring an extra project-level lodash installation.
Written by the indexing model from the issue text.
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.
- Dominant language
- HTML
- Stars
- 56
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudinary/js-url-gen
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cloudinary/js-url-gen#608 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cloudinary/js-url-gen#606 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
cloudinary/js-url-gen#600 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cloudinary/js-url-gen#588 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
cloudinary/js-url-gen#587 · 4 comments ·
All issues in cloudinary/js-url-gen
Similar issues
-
bug lab rust-mcp
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:system good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area:docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
thainanluiz/TSSuper#30 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenFreeEnergy/Lomap#180 ·
-
agent:WSL bug code-review linux pri:medium sev:low tooling
Difficulty 2/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day