embermap / ember-cli-fastboot-testing

Test your FastBoot-rendered HTML alongside your application's tests.
https://embermap.github.io/ember-cli-fastboot-testing
MIT License
39 stars 18 forks source link

Monorepo support #777

Open runspired opened 1 year ago

runspired commented 1 year ago

I had forgotten about this until I recently began cleaning up EmberData's root package.json and hit the issue again. This project requires re-declaring all ember-cli and ember-source deps into monorepo-root in order for it to resolve them. It needs instead to properly resolve dependencies from the workspace root.

SergeAstapov commented 1 year ago

@runspired just to confirm, do you mean this check https://github.com/embermap/ember-cli-fastboot-testing/blob/master/index.js#L31 ?

runspired commented 1 year ago

@SergeAstapov I'm not entirely sure which thing in this project results in the problem, but if you want to replicate on EmberData main remove ember-cli and/or ember-source from the root package.json and immediately the fastboot test app in tests/fastboot will blow up on build/test if ember-cli-fastboot-testing is still installed.

The error you get will be around bower no longer being supported, which happens because ember-cli does a version-check for bower if ember-source is not found.

I believe this indicates that there is some attempted determination of project-root for require.resolve that fails when the git root is different than the workspace root. This could well be the line you just linked to.

SergeAstapov commented 1 year ago

@runspired thank you! this will give me info to replicate problem which should lead me to the root cause of the issue