Open jiburan999888 opened 11 months ago
这个是后端服务,打开网页需打包前端项目 教程在readme
这个是老公服务,打开网页需预留前端项目 教程在自述文件中
(suangua) D:\github\chatgpt-tarot-divination-main>cd frontend
(suangua) D:\github\chatgpt-tarot-divination-main\frontend>pnpm install Lockfile is up to date, resolution step is skipped Already up to date Done in 515ms
(suangua) D:\github\chatgpt-tarot-divination-main\frontend>pnpm build --emptyOutDir
chatgpt-tarot-divination@0.0.0 build D:\github\chatgpt-tarot-divination-main\frontend vite build --mode prod "--emptyOutDir"
vite v4.4.9 building for prod... [plugin:vite:resolve] Module "punycode" has been externalized for browser compatibility, imported by "D:/github/chatgpt-tarot-divination-main/frontend/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. ✓ 2582 modules transformed. dist/index.html 0.55 kB │ gzip: 0.38 kB dist/assets/index-e7058fe6.css 0.83 kB │ gzip: 0.25 kB dist/assets/index-98b64313.js 794.22 kB │ gzip: 240.06 kB
(!) Some chunks are larger than 500 kBs after minification. Consider:
(suangua) D:\github\chatgpt-tarot-divination-main\frontend>cd ..
(suangua) D:\github\chatgpt-tarot-divination-main>D:\github\chatgpt-tarot-divination-main\venv\Scripts\python.exe main.py 2024-01-31 16:14:50,280: INFO: router.chatgpt_router: Loaded divination types: ['tarot', 'birthday', 'name', 'dream', 'new_name', 'plum_flower', 'fate'] INFO: Started server process [38188] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: 127.0.0.1:62466 - "GET / HTTP/1.1" 404 Not Found
请问我这已经按照前端步骤进行了,但问题还是没有解决,是我哪里做错了吗?网页还是显示detail: "Not Found"
这个是老公服务,打开网页需预留前端项目 教程在自述文件中
(suangua) D:\github\chatgpt-tarot-divination-main>cd frontend
(suangua) D:\github\chatgpt-tarot-divination-main\frontend>pnpm install Lockfile is up to date, resolution step is skipped Already up to date Done in 515ms
(suangua) D:\github\chatgpt-tarot-divination-main\frontend>pnpm build --emptyOutDir
chatgpt-tarot-divination@0.0.0 build D:\github\chatgpt-tarot-divination-main\frontend vite build --mode prod "--emptyOutDir"
vite v4.4.9 building for prod... [plugin:vite:resolve] Module "punycode" has been externalized for browser compatibility, imported by "D:/github/chatgpt-tarot-divination-main/frontend/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. ✓ 2582 modules transformed. dist/index.html 0.55 kB │ gzip: 0.38 kB dist/assets/index-e7058fe6.css 0.83 kB │ gzip: 0.25 kB dist/assets/index-98b64313.js 794.22 kB │ gzip: 240.06 kB
(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. ✓ built in 4.67s
(suangua) D:\github\chatgpt-tarot-divination-main\frontend>cd ..
(suangua) D:\github\chatgpt-tarot-divination-main>D:\github\chatgpt-tarot-divination-main\venv\Scripts\python.exe main.py 2024-01-31 16:14:50,280: INFO: router.chatgpt_router: Loaded divination types: ['tarot', 'birthday', 'name', 'dream', 'new_name', 'plum_flower', 'fate'] INFO: Started server process [38188] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: 127.0.0.1:62466 - "GET / HTTP/1.1" 404 Not Found
请问我这已经按照前端步骤进行了,但问题还是没有解决,是我哪里做错了吗?网页还是显示detail: "Not Found"
需要打包一下前端服务
cd frontend
pnpm install
pnpm build --emptyOutDir
root@iZt4naudvth5fc699pje2kZ:~/chatgpt-tarot-divination# ./venv/bin/python3 main.py 2023-10-25 21:28:01,267: INFO: router.chatgpt_router: Loaded divination types: ['tarot', 'birthday', 'name', 'dream', 'new_name', 'plum_flower', 'fate'] INFO: Started server process [58389] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: 59.42.87.37:14972 - "GET / HTTP/1.1" 404 Not Found