Open FlyingCarlos opened 1 month ago
Hi @FlyingCarlos ! It's likely that the gradio cc dev command can't find the AiEnv
environment.
No custom components were found in D:\project\editablechatbot. It is likely that dev mode does not work properly. Please pass the --gradio-path
and --python-path CLI arguments so that gradio uses the right executables.
Can you please set the --gradio-path
and --python-path
arguments to the correct location (and verify that your custom component has been installed there beforehand please)
Thanks @freddyaboulton. I tried, and it seems to solve one problem, but then another one arises. The front server still failed to GET something. the server log:
(AIenv)PS D:\project\editablechatbot> gradio cc dev --gradio-path D:\ProgramData\anaconda3\envs\AIenv\Scripts\gradio.exe --python-path D:\ProgramData\anaconda3\envs\AIenv\python.exe
â™» Launching demo\app.py in reload mode
Watching: 'D:\project\editablechatbot\demo' 'D:\project\editablechatbot'
'D:\project\editablechatbot\frontend',
Backend Server: http://127.0.0.1:7861
Frontend Server (Go here): http://localhost:7862/
X [ERROR] Could not resolve "virtual:component-loader"
frontend/node_modules/@gradio/utils/src/utils.ts:237:10:
237 │ import("virtual:component-loader").then((module) => {
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "virtual:component-loader" as external to exclude it from the bundle, which will remove this error and leave the
unresolved path in the bundle. You can also add ".catch()" here to handle this failure at run-time instead of bundle-time.
[2m20:05:26[22m [31m[1m[22m[39m [31merror while updating dependencies:
Error: Build failed with 1 error:
frontend/node_modules/@gradio/utils/src/utils.ts:237:10: ERROR: Could not resolve "virtual:component-loader"
at failureErrorWithLog (D:\project\editablechatbot\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:1472:15)
at D:\project\editablechatbot\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:945:25
at D:\project\editablechatbot\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:1353:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)[39m
Hmm that should have been fixed. Can you please check what version of @gradio/preview
got installed? (in frontend/package.json
) It should be 0.10.1
Yes, it is "@gradio/preview": "0.10.1",
{
"name": "gradio_editablechatbot",
"version": "0.12.1",
"description": "Gradio UI packages",
"type": "module",
"author": "",
"license": "ISC",
"private": false,
"dependencies": {
"@gradio/atoms": "0.7.6",
"@gradio/client": "1.3.0",
"@gradio/gallery": "0.11.2",
"@gradio/icons": "0.6.0",
"@gradio/markdown": "0.8.1",
"@gradio/plot": "0.6.0",
"@gradio/statustracker": "0.7.1",
"@gradio/theme": "0.2.3",
"@gradio/upload": "0.11.5",
"@gradio/utils": "0.5.1",
"@gradio/wasm": "0.11.0",
"@types/dompurify": "^3.0.2",
"@types/katex": "^0.16.0",
"@types/prismjs": "1.26.4",
"dequal": "^2.0.2"
},
"devDependencies": {
"@gradio/audio": "0.12.2",
"@gradio/image": "0.12.2",
"@gradio/preview": "0.10.1",
"@gradio/video": "0.9.2"
},
"main_changeset": true,
"main": "./Index.svelte",
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
}
}
Ok thanks @FlyingCarlos - cc @pngwn in case you have ideas
@FlyingCarlos - can you use WSL in the meantime? It should work there
@freddyaboulton I appreciate your assistance. I attempted to develop on an Ubuntu 22 virtual machine, but the issue persists.
(AIenv) carlosz@carlosz-VirtualBox:~/project/editablechatbot$ gradio cc dev --python-path /home/carlosz/miniconda3/envs/AIenv/bin/python --gradio-path /home/carlosz/miniconda3/envs/AIenv/bin/gradio
â™» Launching demo/app.py in reload mode
Watching: '/home/carlosz/project/editablechatbot/demo'
'/home/carlosz/project/editablechatbot/frontend',
'/home/carlosz/project/editablechatbot'
Backend Server: http://127.0.0.1:7860
Frontend Server (Go here): http://localhost:7861/
✘ [ERROR] Could not resolve "virtual:component-loader"
frontend/node_modules/@gradio/utils/src/utils.ts:237:10:
237 │ import("virtual:component-loader").then((module) => {
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "virtual:component-loader" as external to exclude it from the bundle,
which will remove this error and leave the unresolved path in the bundle. You can also add
".catch()" here to handle this failure at run-time instead of bundle-time.
2:37:34 PM error while updating dependencies:
Error: Build failed with 1 error:
frontend/node_modules/@gradio/utils/src/utils.ts:237:10: ERROR: Could not resolve
"virtual:component-loader"
at failureErrorWithLog
(/home/carlosz/project/editablechatbot/frontend/node_modules/vite/node_modules/esbuild/lib/main
.js:1472:15)
at
/home/carlosz/project/editablechatbot/frontend/node_modules/vite/node_modules/esbuild/lib/main.
js:945:25
at
/home/carlosz/project/editablechatbot/frontend/node_modules/vite/node_modules/esbuild/lib/main.
js:1353:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Yeah. This isn't a windows issue, I think I missed something when fixed a recent bug. Will look soon.
Describe the bug
I try to build a custom Chatbot and so I follow the instruction on tutorial. After I run
gradio cc dev
, some errors occur on terminal, and the frontend server cannot fetch index.js and style.css. I run gradio commands within a conda env on windows.Have you searched existing issues? 🔎
Reproduction
Screenshot
Logs
System Info
Severity
Blocking usage of gradio