-
Notifications
You must be signed in to change notification settings - Fork 15
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
Error importing .mjs in Angular (Typescript) #410
Comments
Hey Phil! First off, thanks for taking the time to try it out! Angular 2+I'll try to look into the Angular 9 issue tonight. DocumentationRegarding the documentation, I don't seem to be having issues accessing it via that URL. 🤔 |
Based on my initial review, I think the removal of Angular Yes, you should be able to recreate by using the angular cli to create their initial "hello world" app Documentation Regarding the docs, I do get to the main page above. I'm referring to the links down the right of the page. Those go to a "file not found" page. Previously, you could browse the api docs to see what was publicly available on SalteAuth, the config options, etc. |
So I looked into this a little bit and it looks like nested imports aren't resolving the way I'd expect. e.g. When you import Line 5 in a8caf5b
However, when you import Line 4 in a8caf5b
Still looking to see if there's anything I can add to the package.json or in the angular.json file to hint at webpack regarding how it should be resolving this. |
|
new Generic.OpenID({ | |
login(): string { | |
return 'https://salte-os.auth0.com/authorize'; | |
}, | |
logout(): string { | |
return this.url('https://salte-os.auth0.com/v2/logout', { | |
client_id: this.config.clientID, | |
returnTo: this.config.redirectUrl, | |
}); | |
}, | |
clientID: '9JTBXBREtckkFHTxTNBceewrnn7NeDd0', | |
responseType: 'id_token', | |
routes: true, | |
}), |
Documentation (#412)
Good catch, didn't even notice that!
Not sure why considering the files exist within the repository.
https://github.com/salte-auth/salte-auth.github.io/blob/master/modules/_base_core_events_.html
I think I've found a solution that will work without you making any changes to your configuration. Basically, if I add a This means that it will resolve the I'll have to update every package, unfortunately, I'll let you know when I'm done! |
@pherrmann Sorry it took so long, had a couple of issues I needed to resolve with the automated release process. Can you try it out now with the latest versions of |
@cecilia-sanare yes, the latest update is importing the |
Hi Ceci!
I was looking at what it would take to migrate from 2.x to 3.0. In a simple Angular 9 app, I'm getting compile errors trying to import these new modules. I don't think Typescript likes these .mjs files. I can get past the errors by directly importing the .js file in the package dist directory.
ps - Did you remove the generated api docs? Links here go to broken pages. https://salte-auth.github.io/
Description
In a simple Angular 9 app,
import { Redirect } from '@salte-auth/redirect';
yields the following errorERROR in ./node_modules/@salte-auth/redirect/dist/redirect.mjs 40:19-24
Can't import the named export 'Utils' from non EcmaScript module (only default export is available)
No compile errors with an import like this:
import { Redirect } from '@salte-auth/redirect/dist/redirect.js';
Expected outcome
No compile errors starting angular app
Actual outcome
The text was updated successfully, but these errors were encountered: