angular2-jwt.d.ts gives "Cannot find module '@angular/http" error
The @angular/http
is only available from RC versions of Angular2. Before it was angular2/http
.
Since the angular2-jwt library requires the @angular/http
module, you need to upgrade your application to a RC version of Angular2.
For this you can update your package.json
file and execute the command: npm install
:
"dependencies": {
"@angular": "2.0.0-rc.1",
(...)
}
try this:
npm install @angular/http@latest
you need to add dependencies of angular2-jwt:
npm install angular2-jwt --save