-
Notifications
You must be signed in to change notification settings - Fork 138
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
Could not find module ember-get-config imported from (require) #823
Comments
@alexlafroscia it seems this error might be caused by |
It’s possible to disable a built in compat adapter if it’s causing trouble.
You set the `compatAdapters` option to a Map where the name of the addon
maps to null.
…On Mon, May 24, 2021 at 8:38 AM Maksym Shcherban ***@***.***> wrote:
@alexlafroscia <https://github.com/alexlafroscia> it seems this error
might be caused by ember-get-config compat adapter that you wrote in #770
<#770>. I have tried
removing it from my ***@***.***/compat/src/ember-get-config.*
and now my application loads perfectly fine. What could be the reason for
that? If you have time, can you please look into this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#823 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACN6MTYON2U3P4UZFZXZJDTPJCCRANCNFSM45ND5Q3Q>
.
|
@ef4 Thank you very much, it works. The question however remains, why did the compat adapter cause problems in the first place. |
Agreed, that is just a workaround until we can sort it out. If it's not needed, great, we can delete it. The goal is to eventually delete all the compat adapters as addons become compatible enough without them. |
Thank you for clarification. In that case I am closing the issue. |
We can keep this open so we remember to either delete it or figure out which versions really need it. |
The compat adapter was created originally because When talking through that fact with @ef4, it was suggested that we use a compat adapter to generate a different implementation with the same outcome, that doesn't require the addon depending on the host app. It's possible What kind of error did you see? |
The one in issue title: |
I get the same error as @maxymczech above when running with Adding |
@johanrd Our app is currently on version
|
@maxymczech thanks, tried again now, and it worked! Not sure why it failed an hour ago, thanks for the message. |
FYI: Tried to reproduce now, and the issue comes back if I regenerate the |
embroider: Disable `ember-get-config` compat adapter see embroider-build/embroider#823
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from from the said error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
`ember-get-config`, latest version 0.5.0, doesn't support Embroider yet as this PR has not been merged as the time of writing this commit: mansona/ember-get-config#29 In parallel, Embroider tests scenarios fail on our side: https://github.com/peopledoc/ember-feature-controls/actions/runs/1408588177 | `--> Relates to this issue: embroider-build/embroider#823 This issue 823 recommends to use `require('@embroider/compat').compatBuild` in order to disable Embroider's adapter `ember-get-config` (see also https://github.com/embroider-build/embroider/tree/v0.47.1#options). But it does not work: `app` is not accepted by `compatBuild()` because it is an `EmberAddon`, not an `EmberApp`. Log from the error: ``` Argument of type 'EmberAddon' is not assignable to parameter of type 'EmberAppInstance'. Property 'testIndex' is missing in type 'EmberAddon' but required in type 'EmberAppInstance'.ts(2345) ``` However, the following document indicates we can pass these options to `maybeEmbroider()` to configure Embroider: https://github.com/embroider-build/embroider/tree/v0.47.1/packages/test-setup#maybeembroiderapp-embroideroptions References: - Embroider's adapter for `ember-get-config`: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/compat-adapters/ember-get-config.ts - Embroider compatibility options: https://github.com/embroider-build/embroider/blob/v0.47.1/packages/compat/src/options.ts#L46-L61 - Discussions on Discord where I first saw the same initial issue: - https://discordapp.com/channels/480462759797063690/568935504288940056/901170716949512233 - https://discordapp.com/channels/480462759797063690/568935504288940056/902484167915364433
I also had things working previously with the existing |
This issue is fixed in PR #1030, which isn't merged yet. |
embroider: Remove obsolete `ember-get-config` workaround embroider-build/embroider#823 has been resolved by now.
Hello. I am trying to migrate Ember app to Embroider and I am getting this error from several addon packages:
ember-cli-moment-shim
ember-drag-drop-polyfill
I am using Ember 3.26 and Embroider 0.41.0
The text was updated successfully, but these errors were encountered: