Lodash - '_' refers to a UMD global and lodash.js is not a module errors
I use import * as _ from 'lodash';
in my working file after installing lodash.
I added following code in my global typing definition file (~\src\typings.d.ts) to fix the problem. I'm using Angular CLI 1.7
// lodash global typing - begin
declare namespace _ {
}
// lodash global typing - end
I added in my ~\src\typings.d.ts :
declare const _;
It works for me. See also