Repository navigation
Description
If I create a new 'classic layout' Ember application using the latest version of Ember CLI and then installing the latest ember-cli-fastboot like this
ember new test-fastboot-classic --yarn
ember install [email protected]
Fastboot works — repo available here.
However, if I create a new Ember application with module unification using the latest version of Ember CLI and then installing the latest ember-cli-fastboot like this
MODULE_UNIFICATION=true EMBER_CLI_MODULE_UNIFICATION=true ember new test-fastboot-mu --yarn
ember install [email protected]
Fastboot does not work — repo available here.
I also for good measure updated the version of ember-source to the most recent.
"ember-source": "https://s3.amazonaws.com/builds.emberjs.com/canary/shas/fe23def07ebe22e0ba44f97897bd63962f37c3ca.tgz",
The server initially runs
⇒ EMBER_CLI_MODULE_UNIFICATION=true ember serve
Build successful (8099ms) – Serving on http://localhost:4200/
Slowest Nodes (totalTime => 5% ) | Total (avg)
----------------------------------------------+---------------------
Babel: ember-data (2) | 3359ms (1679 ms)
Babel: ember-test-helpers (2) | 1269ms (634 ms)
Babel: test-fastboot-mu (4) | 779ms (194 ms)
Package /assets/vendor.js (1) | 522ms
App is being served by FastBoot
DEBUG: -------------------------------
DEBUG: Ember : 3.4.0-canary+fe23def0
DEBUG: Ember Data : 3.1.1
DEBUG: -------------------------------
But hitting http://localhost:4200/ returns this error in the console and browser
Error: Assertion Failed: 'config' is not a recognized type
at assert (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/@glimmer/resolver/utils/debug.js:10:1)
at Resolver._definitiveCollection (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/@glimmer/resolver/resolver.js:112:1)
at Resolver.identify (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/@glimmer/resolver/resolver.js:76:1)
at Resolver.resolve (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/@glimmer/resolver/resolver.js:104:1)
at Class.resolve (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/ember-resolver/resolvers/glimmer-wrapper/index.js:152:1)
at Class.resolve (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/ember-resolver/resolvers/fallback/index.js:15:1)
at Class.superWrapper [as resolve] (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-utils.js:308:1)
at _resolve (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/container.js:814:1)
at Registry.resolve (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/container.js:564:1)
at Registry.resolve (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/container.js:568:1)
at Class.resolveRegistration (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-runtime/lib/mixins/registry_proxy.js:17:1)
at Class.<anonymous> (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/ember-cli-fastboot/locations/none.js:16:1)
at ComputedProperty.get (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-metal.js:2536:1)
at _get (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-metal.js:1358:1)
at _getPath (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-metal.js:1405:1)
at _get (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-metal.js:1390:1)
at Class.<anonymous> (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/@ember/object/lib/computed/computed_macros.js:249:1)
at ComputedProperty.get (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-metal.js:2536:1)
at Object._get [as get] (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-metal.js:1358:1)
at Class.setURL (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/addon-tree-output/ember-cli-fastboot/locations/none.js:48:1)
at Class.superWrapper [as setURL] (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-utils.js:308:1)
at Class.visit (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/@ember/application/instance.js:186:1)
at buildAppInstance.then.then (/Users/username/git/test-fastboot-mu/node_modules/fastboot/src/ember-app.js:260:28)
at tryCatcher (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/rsvp.js:200:1)
at invokeCallback (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/rsvp.js:372:1)
at publish (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/rsvp.js:358:1)
at /Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/ember-testing/lib/ext/rsvp.js:14:1
at invokeWithOnError (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/backburner.js:256:1)
at Queue.flush (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/backburner.js:167:1)
at DeferredActionQueues.flush (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/backburner.js:326:1)
at Backburner._end (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/backburner.js:772:1)
at Backburner._boundAutorunEnd (/Users/username/git/test-fastboot-mu/tmp/broccoli_merge_trees-output_path-jnu1zxvT.tmp/assets/backburner.js:484:1)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:118:7)
It seems like there is a problem with the resolver, but I haven't been able to debug it myself.
Any help much appreciated.
Activity
rwjblue commentedon Jun 8, 2018
Hmm, does that error still occur if you remove fastboot?
I’m guessing that the issue is that this resolver config needs the
configtype added. Maybe you could confirm and send in a PR over there?chrism commentedon Jun 8, 2018
Sorry for my slow reply.
No, it was working fine.
So... I have tried to do this.
I forked the
ember-resolverrepo and adding it topackage.jsonin the form"ember-resolver": "file:./../ember-resolver"Running
yarnseemed to update the package and after adding the type (I started with this as I don't really have an understanding of how this works).config: {},There was a different error regarding the need for a
definitiveCollectioninstead ofnot a recognized type.This is when I ran into problems :(
It didn't seem like my app was picking up the changes I'd made to the local
ember-resolverpackage.In my attempt to pull in the latest version (this is all new to me) I ran
yarn upgrade ember-resolverThis changed quite a few dependencies and after that any attempt to run
EMBER_CLI_MODULE_UNIFICATION=true ember serveNow resulted in an error message.
Cannot read property 'replace' of undefinedChecking the error log showed this
What is really strange is that out of desperation I deleted the entire directory and cloned it again from the github repo I'd made. Even after doing that I keep getting that error.
I noticed someone in the Emberjs ember-cli slack channel was getting the same error today.
https://embercommunity.slack.com/archives/C045BNHAP/p1528424624000162
So I created a new project from scratch using
MODULE_UNIFICATION=true EMBER_CLI_MODULE_UNIFICATION=true ember new brand-new --yarnThis also has the same issue when running
EMBER_CLI_MODULE_UNIFICATION=true ember serveWhich makes me think that a dependency has changed which has broken something else...
Sorry that I have not been able to be more productive in helping-I'd hoped to be able to submit that PR independently, but hopefully at least documenting these issues might be useful information, too.
chrism commentedon Jun 9, 2018
I started from scratch on a different computer and have submitted this PR which seems to fix the original issue.
For the
Cannot read property 'replace' of undefinedproblem I'm going to try to understand why that is happening first and if needed raise another issue as I think it's completely unrelated to this.chrism commentedon Jun 9, 2018
I think I've now discovered the cause of
Cannot read property 'replace' of undefinedand have created a separate issue on the ember-cli repo.betocantu93 commentedon Jan 12, 2019
I'm using
ember-cli-createto create an octane app...ember serveall good, I then installedember-cli-fastboot+prember,ember serveagain and I'm gettingbobisjan commentedon Jan 12, 2019
@betocantu93, your issue may be caused by the removal of
|| {}introduced here? /cc @bekzodbekzod commentedon Jan 12, 2019
is
windowavailable in fastboot mode ? I removed it becausewindow.performanceis supported on all browsers higher than IE9 https://developer.mozilla.org/en-US/docs/Web/API/Window/performancebobisjan commentedon Jan 12, 2019
Yes, see https://github.com/ember-fastboot/fastboot/blob/master/src/sandbox.js#L34.
bekzod commentedon Jan 12, 2019
@bobisjan thanks, then that is the fault, you can submit PR if you want, it is midnight where I am 😴
bobisjan commentedon Jan 12, 2019
No problem, will do 🙂.
betocantu93 commentedon Jan 12, 2019
I guess it's, thanks!
chrism commentedon Sep 18, 2020
I think that this is no longer relevant as Module Unification has been discontinued.