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

chore(deps): Revert vite upgrade #6349

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

li-boxuan
Copy link
Collaborator

@li-boxuan li-boxuan commented Jan 18, 2025

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions

#6332 broke my local frontend. After some digging I found it was due to the automated vite upgrade.

Without this revert, I got the following error when running the frontend from source code:

Cannot use import statement outside a module
    at wrapSafe (node:internal/modules/cjs/loader:1378:20)
    at Module._compile (node:internal/modules/cjs/loader:1428:41)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1220:24)
    at SSRCompatModuleRunner.cachedRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1167:76)
    at eval (/Users/liboxuan/workspace/OpenDevin/frontend/src/components/features/chat/chat-input.tsx:5:31)
    at ESModulesEvaluator.runInlinedModule (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1049:5)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1271:61)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:30789:23)
    at SSRCompatModuleRunner.cachedRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1167:76)
    at eval (/Users/liboxuan/workspace/OpenDevin/frontend/src/components/shared/task-form.tsx:11:31)
    at ESModulesEvaluator.runInlinedModule (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1049:5)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1271:61)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:30789:23)
    at SSRCompatModuleRunner.cachedRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1167:76)
    at eval (/Users/liboxuan/workspace/OpenDevin/frontend/src/routes/_oh._index/route.tsx:19:32)
    at ESModulesEvaluator.runInlinedModule (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1049:5)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1271:61)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:30789:23)
    at SSRCompatModuleRunner.cachedRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1167:76)
    at eval (virtual:react-router/server-build:7:31)
    at ESModulesEvaluator.runInlinedModule (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1049:5)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1271:61)
    at SSRCompatModuleRunner.directRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:30789:23)
    at SSRCompatModuleRunner.cachedRequest (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1167:76)
    at SSRCompatModuleRunner.import (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/module-runner.js:1104:12)
    at instantiateModule (file:///Users/liboxuan/workspace/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:30746:12)
    at /Users/liboxuan/workspace/OpenDevin/frontend/node_modules/@react-router/dev/dist/vite.js:2000:29

Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:d9a1bae-nikolaik   --name openhands-app-d9a1bae   docker.all-hands.dev/all-hands-ai/openhands:d9a1bae

@li-boxuan li-boxuan requested a review from amanape January 18, 2025 23:21
@li-boxuan li-boxuan enabled auto-merge (squash) January 19, 2025 05:28
@li-boxuan li-boxuan merged commit 06121bf into main Jan 20, 2025
15 checks passed
@li-boxuan li-boxuan deleted the boxuanli/revert-vite-upgrade branch January 20, 2025 18:11
@amanape
Copy link
Member

amanape commented Jan 21, 2025

Sorry about that!

zchn pushed a commit to zchn/OpenHands that referenced this pull request Feb 4, 2025
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.

3 participants