ember-simple-auth-oidc icon indicating copy to clipboard operation
ember-simple-auth-oidc copied to clipboard

Can't find polyfill for assign

Open steveklewis opened this issue 2 years ago • 6 comments

Hello there,

I'm not sure if this is the right place, but I was trying to set up a new Ember project to login against Keycloak, and I'm getting this error:

"Could not find module @ember/polyfills imported from ember-simple-auth/utils/assign"

I'm probably doing something very dumb.

What I've tried:

  • I'm on Node v18.15.0, Ember 5.2.1.
  • If I try to add the polyfill for assign, the Ember cli tells me that it's unnecessary and to remove it from package.json.

Thanks in advance!

steveklewis avatar Aug 29 '23 19:08 steveklewis

Hey @steveklewis, will have a look into this. Besides the warning, is it working with the polyfill installed?

derrabauke avatar Aug 30 '23 09:08 derrabauke

Hey @steveklewis, will have a look into this. Besides the warning, is it working with the polyfill installed?

"If I try to add the polyfill for assign, the Ember cli tells me that it's unnecessary and to remove it from package.json." I should have made this sentence more prominent in the original issue description.

steveklewis avatar Aug 30 '23 13:08 steveklewis

Hey @steveklewis, will have a look into this. Besides the warning, is it working with the polyfill installed?

"If I try to add the polyfill for assign, the Ember cli tells me that it's unnecessary and to remove it from package.json." I should have made this sentence more prominent in the original issue description.

I did not miss the sentence. But "ember cli tells me" does sound like a warning, not like an error to me. :shrug: So... is it a warning or a blocking error? :sweat_smile:

Anyways, I think you should dig deeper, since the warning comes from ember-simple-auth/utils/assign.

Which version of ember-simple-auth-oidc are you using? Since 4.1.1 we are on ember-simple-auth: ^4.2.2 which should include a refactored version of ember-simple-auth. The requirement for @ember/polyfills disappears in version 6.0.0 of esa.

I've just released a new version of our addon with the latest release of ember-simple-auth. You could give that a try!

derrabauke avatar Aug 30 '23 14:08 derrabauke

Hey @steveklewis, will have a look into this. Besides the warning, is it working with the polyfill installed?

"If I try to add the polyfill for assign, the Ember cli tells me that it's unnecessary and to remove it from package.json." I should have made this sentence more prominent in the original issue description.

I did not miss the sentence. But "ember cli tells me" does sound like a warning, not like an error to me. 🤷 So... is it a warning or a blocking error? 😅

Anyways, I think you should dig deeper, since the warning comes from ember-simple-auth/utils/assign.

Which version of ember-simple-auth-oidc are you using? Since 4.1.1 we are on ember-simple-auth: ^4.2.2 which should include a refactored version of ember-simple-auth. The requirement for @ember/polyfills disappears in version 6.0.0 of esa.

I've just released a new version of our addon with the latest release of ember-simple-auth. You could give that a try!

OK! I misunderstood, my apologies!

It looked like a warning. Things still came up before. I'll do some more testing this evening. It looks like it's using 5.1.0 for ember-simple-auth-oidc. I'll try the new version tonight as well. I did notice that esa removed that dependency in 6, so I am hopeful.

Again, thank you for the time and trouble!

steveklewis avatar Aug 30 '23 15:08 steveklewis

This is what I'm seeing now:


Command failed with exit code 1: npm install --save-dev --loglevel error ember-simple-auth-oidc
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/ember-source
npm ERR!   dev ember-source@"~5.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer ember-source@"^4.0.0" from [email protected]
npm ERR! node_modules/ember-simple-auth-oidc
npm ERR!   dev ember-simple-auth-oidc@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Doing:

  1. ember new oidc
  2. cd oidc
  3. ember install ember-simple-auth-oidc

I'm gonna look into this more, I gotta be doing something dumb.

steveklewis avatar Aug 31 '23 01:08 steveklewis

Hey @steveklewis, could resolve the issue? Can we close this?

derrabauke avatar Jul 02 '24 07:07 derrabauke