Auth0 Home Blog Docs

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

auth0
login

#1

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 = '';
          this.setSession(authResult);
          this.authenticationStateChanged.next(this.isAuthenticated());
          this.router.navigate(['/home']);
          if (!authResult.idTokenPayload || !authResult.idTokenPayload.name) {
            throw new Error(
              'Error while extracting the user name from authResult.idTokenPayload.name!'
            );
          }
          observer.next(authResult.idTokenPayload.name);
        } else if (err) {
          this.router.navigate(['/home']);
          console.log(err);
          observer.next(false);
        }
      });
      observer.next(undefined);
    });
  }

Authorization Extension: Compilation failed
Auth0-Authorisation
Authorization Extension: Compilation failed
#2

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:


#3

@jmangelo

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.


#4

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


#7

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.


#9

Hi,

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?


#10

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


#11

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


#12

I am also getting this error.

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


#13

@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?


#14

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.


#15

You can track the issue at http://status.auth0.com/incidents/6sls0lhzrc4s


#16

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


#17

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


#18

Can you provide a link to the Authorization Control Page?


#19

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


#20

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


#21

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

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

#22

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.


#23

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