Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing the root "dev" script from a fresh install throw compilation errors #6

Open
patricklafrance opened this issue May 10, 2023 · 2 comments

Comments

@patricklafrance
Copy link
Member

Because the packages dev scripts are long process using watch, they have to be executed in parallel.

When scripts are executed in parralel, the packages topological order is not respected. Therefore it generates compilation errors initially because project A depending on project B will try to use project B before it's fully compiled.

There a great explanation of the issue in this article.

A potential solution is to fix this by adding Turborepo to the project. Not my favorite solution as I feel like we have already have enough tools but if it's the best solution let do it!

@patricklafrance patricklafrance changed the title Executing "dev" script from a fresh install throw compilation errors Executing the root "dev" script from a fresh install throw compilation errors May 10, 2023
@patricklafrance
Copy link
Member Author

patricklafrance commented May 12, 2023

If taking the tooling path, it might be better to go with Nx as it will probably be more widely supported by hosting platforms.

During our call with Netlify they told us they might not support Turborepo because it's owned by Vercel.

@patricklafrance
Copy link
Member Author

Temporary added "temporary-script-until-build-order-topology-is-fixed": "pnpm build" script executed on postinstall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant