Silent Build Error on running pnpm run dev or pnpm run ds after pnpm install (on Windows)
Describe the bug
When running pnpm run dev or pnpm run ds on a fresh clone of the repository, the build for @asyncapi/studio-ui fails. The root cause is a dependency race condition where the @asyncapi/studio-ui package attempts to resolve @asyncapi/studio-utils before the latter has been built.On Windows machines, this often results in "silent" errors where the terminal continues but the application remains in a broken state.
How to Reproduce
1.Clone the asyncapi/studio repository.(on windows) 2.Run pnpm install 3. Run pnpm run dev or pnpm run ds 4.Observe the error in the terminal output:
- Link to GitHub repository with project that has issues: https://github.com/asyncapi/studio
Expected behavior
The development commands (npm run dev and npm run ds) should successfully start the application without giving silent build errors.The build pipeline should automatically ensure that internal dependencies like @asyncapi/studio-utils are built before dependent packages like @asyncapi/studio-ui attempt to use them.
If this issue is approved ,I would be happy to fix this and raise PR !
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
@Yash2004Codes Do you have any approach how to solve this i am looking into the code and try to manually install @asyncapi/studio-utils package and hitting this error it seems - @asyncapi/studio-utils doesn’t exist on npm/pnpm.
- PNPM is warning you about adding it to the workspace root, but that’s not the real issue.
- The real problem is the 404 fetch error → the package isn’t published to pnpm/npm, or it’s private and needs authentication.
Hi @Jatin24062005,
I've investigated the issue and confirmed that the root cause is a race condition where @asyncapi/studio-ui attempts to bundle before its dependency @asyncapi/studio-utils has finished building. This happens because the dev pipeline in turbo.json was configured to run parallel tasks without ensuring that dependencies were built first.
My approach to fix this is:
Enforce Build Order in turbo.json like :
- I updated the dev pipeline to include "dependsOn": ["^build"]. This ensures that before dev starts for any package, the build script for all its dependencies must complete successfully.
- Enable Watch Mode for Utils: I added a "dev": "tsup --watch" script to packages/utils/package.json
This ensures that @asyncapi/studio-utils is included in the dev process and rebuilds automatically when changes are made.
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
Hello @Demiserular @Jatin24062005, Is this still an issue? I tried it. And it functioned correctly.
i have to investiagate but i think its resolved now
Great 👍🏻