Closed charleslavon closed 3 weeks ago
@charleslavon thanks for listing this!
Before running the SOURCE_PATH=near-roc-components/src pnpm dev:components
you should go 2 dirs up from bos-web-engine/apps/web
to bos-web-engine
and run pnpm build
After that the all the packages including the @bos-web-engine/ui
should be visible in the monorepo scope.
Hey @pavelisnear, thanks for the response! I agree that running pnpm build
in the monorepo root is the right thing to do. However, I'm still seeing this issue when doing that. Have you tried these steps?
git@github.com:near/bos-web-engine.git
in a new directorypnpm i
in the rootpnpm build
in the rootpnpm build
- it seems like there's a race condition where deeper child dependencies aren't correctly building before being depended on.Let me know if you're seeing what I'm seeing - maybe I have something funky going on with my machine.
Hey @calebjacob good points you've made, I can also see similar typescript errors at the @bos-web-engine/application
build step. Looks like it really is a race condition we have.
This is as far as I could get in handling it:
git@github.com:near/react-on-chain.git
in a new directorycd react-on-chain
and then run pnpm i
ui
and social-db
by running pnpm turbo run build --filter=ui --filter=social-db
The idea behind these to is to prepare the packages for a clean build of application
later.pnpm turbo run build --filter=application
since without this step the sandbox
build might fail later.pnpm build
- now we are ready to have a total build without successfully.SOURCE_PATH=near-roc-components/src pnpm dev:components
To be honest I'm not happy with these separate prebuilds of ui
, social-db
and application
, so might be a better way.
Thanks for figuring those steps out @pavelisnear! I wonder if we could temporarily update our root pnpm build
script to handle this complexity for us until we figure out a better solution? For example:
"build": "turbo run build --filter=ui --filter=social-db && turbo run build --filter=application && turbo run build"
Ideally, we should have a single command that is capable of building the entire monorepo.
I've retried to build several times and have been stuck on the build step of the hot-reload setup instructions
Caleb shared this tip, but it has yet to work
The issue is that the turbo/pnpm task runner isn't correctly building out the deepest child dependencies first before build up from there. If you keep running pnpm build a few times, you can usually get past all of the errors since it's a race condition issue that eventually resolves.