1

I did try to import lodash in my angular2 project. It's working fine, but I keep having in my log the following error :

TS2307 Cannot find module 'lodash'.
[error] import * as _ from "lodash"

However, I don't have any issue using it. Is there any tsconfig I have to change to prevent that from happening ?

1 Answer 1

2

You need to declare external modules to TypeScript can type check them for you.

Quick fix

typings install lodash --global --save

Sign up to request clarification or add additional context in comments.

2 Comments

Do you know where does that stand in an Angular2 project ?
My bad this has the answer : mhartington.io/post/ionic2-external-libraries Thanks sir

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.