Skip to content

fix: resolve module not found errors in web-evals for .js extension imports#11855

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
fix/web-evals-module-resolution-11853
Draft

fix: resolve module not found errors in web-evals for .js extension imports#11855
roomote-v0[bot] wants to merge 1 commit intomainfrom
fix/web-evals-module-resolution-11853

Conversation

@roomote-v0
Copy link
Contributor

@roomote-v0 roomote-v0 bot commented Mar 4, 2026

Related GitHub Issue

Closes: #11853

Description

This PR attempts to address the "Module not found" errors when building/running apps/web-evals in the evals Docker setup.

Root cause: Workspace packages (@roo-code/types, @roo-code/ipc, @roo-code/cloud) use NodeNext module resolution, which requires .js extensions in TypeScript imports (e.g., export * from "./task.js"). Without proper bundler configuration, the bundler looks for literal .js files instead of resolving them to the actual .ts source files.

Changes:

  • Added turbopack.root pointing to the monorepo root (two directories up), matching the pattern already used by apps/web-roo-code/next.config.ts. This tells Turbopack where the monorepo root is so it can properly resolve workspace package imports.
  • Added webpack resolve.extensionAlias configuration to map .js -> .ts/.tsx (and .mjs/.cjs equivalents). This handles the same resolution for webpack-based builds (next build in some Next.js versions).

Feedback and guidance are welcome.

Test Procedure

  1. Clone the repo and run pnpm evals (or pnpm install && pnpm --filter @roo-code/web-evals build)
  2. Verify the "Module not found: Can't resolve ./task.js" errors no longer appear
  3. Verify the web-evals app starts successfully on port 3446

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue.
  • Scope: Changes are focused on the linked issue (single config file change).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: Unable to run Docker build in this environment; needs manual verification.
  • Documentation Impact: No documentation updates required.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

The apps/web-roo-code Next.js app already has the turbopack.root config and works correctly. This PR brings web-evals in 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

…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
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

Successfully merging this pull request may close these issues.

[BUG] Trying to install evals in Ubuntu, not working due to module errors

1 participant