ember-cli-fastboot
ember-cli-fastboot copied to clipboard
App won't boot, accessing import which doesn't exist, 'ember'
Uncaught ReferenceError: Ember is not defined
This code:
Repro:
- https://github.com/universal-ember/ember-primitives/pull/55
pnpm ipnpm buildpnpm start- visit
http://localhost:5001
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:
- for Ember that no longer provides global
Ember, v4+, how should it be referenced?- all the AMD stuff is private API
- Providing "The Ember global" is too much api surface area, because the above code doesn't need access to all that much
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
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...
https://github.com/ember-fastboot/ember-cli-fastboot/issues/924#issuecomment-1974049187
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 🤔
+1 to this. Hit this after upgrading from embroider/test-setup v2.x to v4.x.