question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find module ember-get-config imported from (require)

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ef4commented, May 24, 2021

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 https://github.com/embroider-build/embroider/pull/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 https://github.com/embroider-build/embroider/issues/823#issuecomment-847013739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACN6MTYON2U3P4UZFZXZJDTPJCCRANCNFSM45ND5Q3Q .

2reactions
alexlafrosciacommented, May 24, 2021

The compat adapter was created originally because ember-get-config generates (or did, at the time that I wrote it) a module that itself depends on your host app without actually listing it as a dependency. This kind of implicit dependency on a module – especially when that module is the host app – isn’t valid.

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 ember-get-config has updated to no longer do that, or do it in a safer way.

What kind of error did you see?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: Could not find module ember-get-config ...
I recently updated to Ember 2.12.0 and started getting the following error: Uncaught Error: Could not find module ember-get-config imported ...
Read more >
Could not find module `undefined/app` imported from `(require ...
I'm able to start my ember app but nothing loads in the screen and I noticed this error in browser console log. Any...
Read more >
Documentation - Module Resolution - TypeScript
In this case, the error would be something like error TS2307: Cannot find module ... imports in Node.js are performed by calling a...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
This error occurs because of the following reasons: you're trying to import an item from a module you don't have installed in your...
Read more >
CommonJS modules | Node.js v19.3.0 Documentation
Use import() instead. The .mjs extension is reserved for ECMAScript Modules which cannot be loaded via require() . See Determining module system section...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found