Auth0 Home Blog Docs

Cannot find module 'auth0-extension-hapi-tools@1.2.2'



I’m using Auth0 with an Angular SPA (Single Page Application) using the (recommended) hosted login approach.

Since today, when calling the this.auth0.parseHash method it would throw me an error: "Authorization Extension: Compilation failed: Cannot find moduleauth0-extension-hapi-tools@1.2.2’“. I tried different commits that worked before as well as different logins, but with none of them worked. I also tried to install the npm packageauth0-extension-hapi-tools@1.2.2’”` which didn’t help neither.

Why is this happening and how can I solve it?

My auth code:

  auth0 = new auth0.WebAuth({
    clientID: AUTH_CONFIG.clientID,
    domain: AUTH_CONFIG.domain,
    responseType: 'token id_token',
    audience: AUTH_CONFIG.apiUrl,
    redirectUri: environment.AUTH0_CALLBACK_URI,
    scope: this.requestedScopes

  public handleAuthentication(): Observable<any> {
    return Observable.create(observer => {
      this.auth0.parseHash((err, authResult) => {
        if (authResult && authResult.accessToken && authResult.idToken) {
          window.location.hash = '';
          if (!authResult.idTokenPayload || ! {
            throw new Error(
              'Error while extracting the user name from!'
        } else if (err) {

Authorization Extension: Compilation failed
Authorization Extension: Compilation failed

If it’s the same as my issue it seems to be related to the Auth0 Authorization Extension.

I’ve just raised an issue here:



Looking at the github issue page, a lot of people have this issue.

We are currently locked out of all our production environments.

This is an emergency and it would be great to have an update from the auth0 team.


according to Authorization Extension: Compilation failed, a user has submitted a ticket and the auth0 team is working on fixing the issue.


The below is my error which i am getting from today morning
“Authorization Extension: Compilation failed: Cannot find module ‘auth0-extension-hapi-tools@1.2.2’”. I am using Auth0-Authorisation extension and adding its claims into access_token.



We’ve just started seeing the following error when using Auth0.js (version 9.2.4) to login to our application using our EU tenant:
Authorization Extension: Compilation failed: Cannot find module ‘auth0-extension-hapi-tools@1.2.2’

We also see it when going to the Authorization extension from the dashboard.

Is there an issue on Auth0’s side with the Authorization extension?


I’m getting this error too. Looks like something wrong at Auth0…


Duplicate of Cannot find module 'auth0-extension-hapi-tools@1.2.2'


I am also getting this error.

We have two different environments, different auth0 accounts and both are having this issues.


@duncan_bpm @mikebridge

I was wondering, if it could be due the node v4 support running out. So I upgraded to node v8 (for the auth0 rules), but it didn’t change anything so far, still the same error. Which node engine do u use?


I have submitted a ticket with Auth0 and they have responded (very quickly) that they are aware of the issue and working to fix it.


You can track the issue at


Note: I moved all relevant reports for this issue to the first topic created


We are now able to log in, but we cannot access the Authorization Control Page on the Auth0 management page.


Can you provide a link to the Authorization Control Page?


Its now loading up, we have a ticket open 40051, things seem to be back to normal.


What was the root cause of this issue? Faced the above error for a while in the morning.


The silent renewal in SPA fails after some time with below error.

Could not get a new token (unauthorized: Authorization Extension: Blocked event loop).