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).


Hey there everyone, I wanted to follow up and let you know that the Authorization Extension: Blocked Event Loop Github issue has been updated and closed.

As stated in the Github issue comment, the following solution for the issue is as follows:

To fix this issue perform the two following actions:

  1. Migrate your Auth0 tenant from Node 4 to Node 8 and then republish the Auth0 rule that is created by the Authorization Extension. Here is the documentation page that explains how to migrate your tenant to Node 8.
  2. After you have migrated to Node8, open the Authorization Extension in the dashboard. In the upper right-hand part of the page, you’ll see your tenant name. Click on your tenant name and select “Configuration” from the drop down menu. On the “Configuration” page, click the “Publish Rule” button. This will recreate your Auth0 rule to use the Node8 runtime.

I wanted to make sure I kept you in the loop on these recent events and if you have any additional questions on the matter please feel free to let us know. Thank you.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.