search_with_lepton
search_with_lepton copied to clipboard
RuntimeError: Directory 'ui' does not exist
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
I met the same problem, I don't know how to fix it.
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
You have to run
npm install
npm run build
inside the web directory to build the ui
folder
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!
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