-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auth0_spa_js_1.default is not a function #99
Comments
We have the same problem. We can't change our tsconfig as the other issues say because doing that breaks our build. |
ok, found the issue, although I can't really say why TS works like this 😬 LOOOOTS of other libraries have the same issue: https://www.google.com/search?q=typescript+default+is+not+a+function
So, the issue here is: since we're using In bazel's case, simply setting @necramirez can you check if this works for you as well? |
That works, thanks! Not sure if you want to stop using |
Yeah, |
Just want to say that |
Hi, I'm trying to use the auth0 library in my project but I'm getting an error:
I've seen some similiar issues, #60, #45, but their setups are a bit different and I've tried the suggested tsconfig fixes and I couldn't get them to work.
My project uses a setup similar to the angular-bazel-example, so I've created a repro of the problem using it. Steps are below.
The auth service from the example is in
src/app/auth/
and I've tried to use the service insrc/app.component.ts
.When you connect to the local server, the page will load and lots of messages will be printed to the console. Make sure you scroll to the top, the error message is there.
I think the problem has something to do with how the
auth0
library is being exported or imported. Looking at the generated code,auth.service.js
(note JS), it tries to access the library with:In my main project I use lots of other 3rd party libraries, e.g.
immutable
,three
, without issue so it's not an issue with loading libraries in general.Please let me know if you need any more info.
Thanks!
The text was updated successfully, but these errors were encountered: