Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript Compiler error TS2307: Cannot find module 'jquery'

I was following JSPM getting started guide and I want to install jquery package so I execute below command.

jspm install jquery

But when I try to import it in typescript like below

import $ from 'jquery'

I'm getting a error from typescript compiler saying error TS2307: Cannot find module 'jquery'. Not only for this library for other libraries I'm getting the same error.

like image 710
Shabith Avatar asked Jan 30 '16 13:01

Shabith


1 Answers

You need to include type definitions for jquery in the compilation context, you can grab them from https://github.com/DefinitelyTyped/DefinitelyTyped

like image 134
Vadim Macagon Avatar answered Sep 20 '22 11:09

Vadim Macagon