fix(turbo): build json-render-ui before hub-vite and hub-next - #201
Merged
Conversation
Both examples dynamically import `@devframes/json-render-ui/hub` at runtime, but neither task's explicit turbo dependsOn list included `@devframes/json-render-ui#build`. On a cold cache, turbo could run hub-vite/hub-next's build before json-render-ui finished, failing with ERR_MODULE_NOT_FOUND on dist/hub.mjs — the failure seen in the e2e CI job.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI's e2e job (`pnpm test:e2e`) has been intermittently failing during the build step with:
```
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../examples/hub-vite/node_modules/@devframes/json-render-ui/dist/hub.mjs'
```
Both `examples/hub-vite` and `examples/hub-next` dynamically `import('@devframes/json-render-ui/hub')` at runtime, and both declare `@devframes/json-render-ui` as a `package.json` dependency. But `turbo.json` gives `hub-vite#build` and `hub-next#build` an explicit `dependsOn` list that overrides turbo's default `^build` (upstream-workspace) behavior — and that list was missing `@devframes/json-render-ui#build`. On a cold cache, turbo could start building the hub examples before `json-render-ui`'s `dist/hub.mjs` existed, racing the failure above.
What
Add `@devframes/json-render-ui#build` to both tasks' `dependsOn` lists.
Verification
🤖 Generated with the help of an agent