Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
Lodash-es with Typescript and Webpack module error

I want to use lodash-es to be able to import only the functions I need, but I get an error.

import { camelCase } from "lodash-es";
//...
console.log(camelCase('Foo'));

Error:

Module not found: Error: Can't resolve 'lodash-es' in '/Users/...

Browser console error

Uncaught Error: Cannot find module 'lodash-es' at webpackMissingModule..

My package.json

...
"devDependencies": {
"@types/lodash": "^4.14.178",
"@types/lodash-es": "^4.17.5",

Using normal lodash I have no problems, but the library is too big for my purpose

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You also need lodash-es (or lodash) in your dependecies. You can import individual functions like this:

import camelCase from "lodash-es/camelCase";

to keep the bundle size low. @types/* packages are just type definitions.

Also, some functions can be installed isolated from the rest: https://www.npmjs.com/package/lodash.camelcase

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!