leptonai / search_with_lepton

Building a quick conversation-based search demo with Lepton AI.
https://search.lepton.run
Apache License 2.0
7.76k stars 988 forks source link

RuntimeError: Directory 'ui' does not exist #71

Open mqd273 opened 6 months ago

mqd273 commented 6 months ago

python run search_with_lepton . exception

File "search_with_lepton\search_with_lepton.py", line 632, in ui return StaticFiles(directory="ui") File "Local\Programs\Python\Python310\lib\site-packages\starlette\staticfiles.py", line 59, in init raise RuntimeError(f"Directory '{directory}' does not exist") RuntimeError: Directory 'ui' does not exist

a136214808 commented 5 months ago

I met the same problem, I don't know how to fix it.

zhangfulei6521 commented 5 months ago

If your node version is too low, it will report an error and cannot be packaged. I also encountered the same problem, and he told me that the version is too low

Stillerman commented 5 months ago

You have to run

npm install
npm run build

inside the web directory to build the ui folder

tc0715888 commented 4 months ago

You can first set up locally, upload the UI folder to the server after successful compilation, and then execute BACKEND=BING python search_with_lepton.py!

jiaohuix commented 4 months ago

next build

▲ Next.js 14.0.4

✓ Creating an optimized production build
✓ Compiled successfully

./src/app/components/answer.tsx 54:33 Warning: Using <img> could result in slower LCP and higher bandwidth. Consider using <Image /> from next/image to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element 54:33 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text 82:31 Warning: Using <img> could result in slower LCP and higher bandwidth. Consider using <Image /> from next/image to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element

./src/app/components/preset-query.tsx 7:39 Warning: React Hook useMemo has an unnecessary dependency: 'query'. Either exclude it or remove the dependency array. react-hooks/exhaustive-deps

./src/app/components/result.tsx 30:6 Warning: React Hook useEffect has a missing dependency: 'rid'. Either include it or remove the dependency array. react-hooks/exhaustive-deps

./src/app/components/sources.tsx 29:11 Warning: Using <img> could result in slower LCP and higher bandwidth. Consider using <Image /> from next/image to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element

info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules ✓ Linting and checking validity of types
Collecting page data .Killed