SOLVED: Failed to setup in element support Error: Could not find module `@glimmer/runtime` imported from `(require)`

Starting a new project. I made some sample routes and everything works, but I’m receiving this error.

The results for ember -v:

ember-cli: 5.6.0 node: 20.11.0 os: win32 x64

Am I missing somethig?

hello! how did you generate your project? is it on GitHub?

Hello!

Solved when I remove node_modules folder e reinstall everything using pnpm and not npm anymore.

I don’t get why the error happened, but… anyway, it’s solved.

Thanks for your interest!

3 Likes

Seeing this as well on a new app. It only triggered after a while, unclear when it started :thinking:

Full stack trace:

failed to setup in element support
Error: Could not find module `@glimmer/runtime` imported from `(require)`
    at missingModule (loader.js:247:1)
    at findModule (loader.js:258:1)
    at requireModule (loader.js:24:1)
    at Object.require (<anonymous>:9754:14)
    at InElementSupportProvider.require (<anonymous>:5759:80)
    at new InElementSupportProvider (<anonymous>:5529:27)
    at new RenderTree (<anonymous>:5783:33)
    at _class.init (<anonymous>:10456:42)
    at new BaseObject (<anonymous>:9484:12)
    at new _default (<anonymous>:818:7)

The app boots normally though. And in a production build it’s fine.

what command did you run and which ember-cli version did you end up using?

The latest versions: (Ember 5.10)

npx ember-cli@latest new my-app --typescript --embroider --no-welcome --pnpm

But I just realized the error originates from the Ember Inspector, and not my own app :grimacing:

Stumbling on the same issue. I see this error when the ember inspector is open.

Not blocking but I’d prefer not to have it.

Did you find a solution?