Search code examples
angularangular5webstormauth0

Auth0 'Unresolved Type WebAuth' in WebStorm


I have been having this issue with Auth0 and WebStorm for a while now. So I upgraded Auth0 to see if the issue was resolved. Here is my DEV environment:

  • WebStorm 2017.3
  • Angular 5.2.6
  • Auth0 9.5.1 (upgrade from 9.0.2)
  • Auth-Lock 11.6.0 (upgrade from 11.0.1)

I am seeing an error. WebStorm is identifying WebAuth as an Unresolved Type. Though the code works, it is annoying seeing this error. Does Auth0 or anyone have a solution for this?

enter image description here enter image description here


Solution

  • It seems that auth0-js does not come with typescript types included. You can resolve this by simply installing the type definitions for auth0-js.

    npm install @types/auth0-js --save-dev