$ npm install --save lodash
# This is the new bit here:
$ npm install --save-dev @types/lodash
import * as _ from 'lodash';
angular.json
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
...
"allowedCommonJsDependencies": [
"lodash"
]
},
...