1

I am getting error

can not find module 'jsonwebtoken'

even if jsonwebtoken package is installed and available in node_modules folder.

import { jwt } from 'jsonwebtoken';
Sandeep
  • 1,182
  • 3
  • 11
  • 26
  • 1
    You didn't provided any details on your project that could help - even a framework. There is **no** such thing as 'AngularJS 2'. There are 'AngularJS' and 'Angular 2'. This can happen for Webpack build if `jsonwebtoken` is not in package.json. Again, it is not possible to say anything specific, because the question contains zero information. – Estus Flask Dec 01 '16 at 18:04
  • have the same problem in my angular2 application, installed dependency (so added into package.json) effectively I can see the dependency into node_modules but when I compile the project (TypeScript project) it throws the same exception – carpinchosaurio Dec 18 '16 at 17:19
  • Are you using `webpack` ? – carpinchosaurio Dec 18 '16 at 17:25
  • @KalTorak i am new to angular and not able to figure out why jsonwebtoken is not working in angular 2. So i have solved my problem using angular2-jwt package and it worked without any issue. – Sandeep Dec 19 '16 at 11:41
  • @Sandeep, ok I make my own question [here](http://stackoverflow.com/questions/41212499/error-using-jsonwebtoken-with-angular-cli-application) because I don't know the detail of your case, but if there is answer here I will link responses here, if not, I will follow your approach – carpinchosaurio Dec 19 '16 at 12:21

0 Answers0