fix: resolve module not found errors in web-evals for .js extension imports#11855
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
fix: resolve module not found errors in web-evals for .js extension imports#11855roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
…config Workspace packages (@roo-code/types, @roo-code/ipc, @roo-code/cloud) use NodeNext module resolution with .js extensions in TypeScript imports. Without proper bundler config, these resolve to literal .js files instead of the actual .ts source files, causing "Module not found" errors. - Add turbopack.root pointing to monorepo root (matching web-roo-code) - Add webpack resolve.extensionAlias to map .js -> .ts/.tsx for builds Fixes #11853
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.
Related GitHub Issue
Closes: #11853
Description
This PR attempts to address the "Module not found" errors when building/running
apps/web-evalsin the evals Docker setup.Root cause: Workspace packages (
@roo-code/types,@roo-code/ipc,@roo-code/cloud) use NodeNext module resolution, which requires.jsextensions in TypeScript imports (e.g.,export * from "./task.js"). Without proper bundler configuration, the bundler looks for literal.jsfiles instead of resolving them to the actual.tssource files.Changes:
turbopack.rootpointing to the monorepo root (two directories up), matching the pattern already used byapps/web-roo-code/next.config.ts. This tells Turbopack where the monorepo root is so it can properly resolve workspace package imports.resolve.extensionAliasconfiguration to map.js->.ts/.tsx(and.mjs/.cjsequivalents). This handles the same resolution for webpack-based builds (next buildin some Next.js versions).Feedback and guidance are welcome.
Test Procedure
pnpm evals(orpnpm install && pnpm --filter @roo-code/web-evals build)Pre-Submission Checklist
Documentation Updates
Additional Notes
The
apps/web-roo-codeNext.js app already has theturbopack.rootconfig and works correctly. This PR bringsweb-evalsin line with that pattern and adds webpack extensionAlias as an additional safety net for builds that may still use webpack.Interactively review PR in Roo Code Cloud