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
Authorization Extension: Compilation failed
Auth0-Authorisation
#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).