In my Angular 8 TypeScript code I was importing lodash directy (e.g. import * as _ from 'lodash';
). In my package.json
I had "lodash": "^4.17.15"
.
I decided to install the @types/lodash-es
module and import the specific lodash functions that way (e.g. import { map } from 'lodash-es';
). It is better because it saves runtime space and also uses the standard Angular/TypeScript import mechanism.
However, now when I run a build I am getting this error:
Module not found: Error: Can't resolve 'lodash-es'
How can I fix this error?
lodash.clone
and whatever additions have been made since now. Also, we need food, water, top 3 stock picks, and a new flux capacitor. – Lore