search_with_lepton icon indicating copy to clipboard operation
search_with_lepton copied to clipboard

RuntimeError: Directory 'ui' does not exist

Open mqd273 opened this issue 10 months ago • 5 comments

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

mqd273 avatar Apr 04 '24 04:04 mqd273

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

a136214808 avatar Apr 12 '24 08:04 a136214808

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

zhangfulei6521 avatar Apr 20 '24 03:04 zhangfulei6521

You have to run

npm install
npm run build

inside the web directory to build the ui folder

Stillerman avatar Apr 26 '24 15:04 Stillerman

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!

tc0715888 avatar May 09 '24 02:05 tc0715888

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

jiaohuix avatar May 26 '24 14:05 jiaohuix