Q:

Angular cli adding external lib

So I am trying to add lodash to fresh project based on angular cli. I've made it 
on morning and it worked brilliant. But now I'am getting:
EXCEPTION: Error in :0:0 caused by: __WEBPACK_IMPORTED_MODULE_1_lodash__.fill is not a function

Since I am using fresh angular cli
angular-cli: 1.0.0-beta.20-4
node: 6.2.1
os: win32 x64

I've only installed lodash:
 npm install lodash --save
 npm install @types/lodash --save-dev

 #angular-cli.json

 "scripts": [
    "../node_modules/lodash/lodash.js"
  ],

and added in code:
import * as _ from 'lodash';
export class AppComponent {
   title = 'app works!' + _.fill(Array(3), 2);
}

So what could be wrong ?

A:

You don't need to add it as a global script, just import it in the module that you need it and that's it. If you import it both as a global JS and then as an import in a module, it will override itself. 
More info here:
https://weblog.west-wind.com/posts/2016/Sep/12/External-JavaScript-dependencies-in-Typescript-and-Angular-2

