ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
851 stars 160 forks source link

App won't boot, accessing import which doesn't exist, 'ember' #925

Closed NullVoxPopuli closed 5 months ago

NullVoxPopuli commented 1 year ago
Uncaught ReferenceError: Ember is not defined

This code: image

Repro:

Here is the code to fix: https://github.com/ember-fastboot/ember-cli-fastboot/blob/ddbfeb36c14001c79527f1d1ca64b4f594a1bf91/packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js#L4

The questions:

mkszepp commented 1 year ago

i was running into the same error today...

while looking the issues, i have found out, that there exists an other issue which has noted the same lines https://github.com/ember-fastboot/ember-cli-fastboot/issues/924

simonihmig commented 9 months ago

Just stumbled upon this. I assume this happening only when running under Embroider?

In this case you can workaround this by setting staticEmberSource: false. Then that AMD require stuff should be working again...

villander commented 7 months ago

https://github.com/ember-fastboot/ember-cli-fastboot/issues/924#issuecomment-1974049187

IgnaceMaes commented 6 months ago

Just ran into this as well.

Just stumbled upon this. I assume this happening only when running under Embroider?

In this case you can workaround this by setting staticEmberSource: false. Then that AMD require stuff should be working again...

Setting this flag does indeed resolve the issue. I wonder what changes are needed to have support for static Ember source 🤔

raido commented 5 months ago

+1 to this. Hit this after upgrading from embroider/test-setup v2.x to v4.x.