iyaja / llama-fs

A self-organizing file system with llama 3
MIT License
4.49k stars 259 forks source link

前端UI界面(electron-react-app)应用部署失败,无法使用。 #28

Open GaaraDGC opened 1 month ago

GaaraDGC commented 1 month ago

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

标签 | 需求帮助 -- | -- 标题 | 前端UI界面应用(electron-react-app)部署失败,无法使用 版本 | 6月1日拉取 系统环境 | Windows 11 家庭中文版 64-bit (10.0, Build 22631) 问题描述 | 因为npm联网获取ts-node时,证书认证失败,导致部署前端失败,无法启动前端程序。 技术经验 | 设计工作者,非软件工程师,缺乏curl使用与系统部署经验 影响 | 耗费 5 hours 未能解决 部署过程 | 1、Clone the repository:  git clone https://github.com/iyaja/llama-fs.git 2、Navigate to the project directory:  cd llama-fs 3、Install requirements: pip install -r requirements.txt(遇到字符编码问题,从git切换至新版windows terminal 打开 powershell重新运行命令即可)(安装过程中出现警告提示:WARNING: The script fastapi.exe is installed in 'C:\Users\elreydepolvo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.   Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.;第5点时需要添加fastapi对应环境变量) 4、Install moondream: ollama pull moondream 5、进入目录cd llama-fs 执行以下命令,启动后台服务 fastapi dev server.py(运行结果报错提示,没找到命令,在系统设置-环境变量中编辑path添加C:\Users\elreydepolvo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts后,运行成功) 使用过程 | 6、测试curl(curl -X POST http://127.0.0.1:8000  -H "Content-Type: application/json"  -d '{"path": "/Users/elreydepolvo/Downloads/llama-fs-main/llama-fs-main/sample_data/", "instruction": "string", "incognito": false}')异常报错 7、执行npm start(运行报错:找不到npm命令,在https://nodejs.org/en下载node-v20.14.0-x64.msi文件,双击安装默认路径安装npm后,进入cd electron-react-app再次执行npm start)启动electron-react-app前端应用。【报错】 执行npm run package尝试启动electron-react-app前端应用。【报错】 预期结果 | 成功部署前后端程序,并正常运行,能够自动识别样本文件夹内文件,并给出命名建议。 实际结果 | 部署失败,无法启动 尝试过程 | 8、更新ts-node ts-node-10.9.2 9、尝试修复或跳过更新认证问题(npm config set strict-ssl false) 10、使用bing搜索引擎检索 11、使用LLM(只能给出网上以有解决方案)多次、多个LLM结论相同,重复无效建议 12、提交issue 尝试过解决方案(未成功) | 更新过npm版本; 10.9.2(https://npmmirror.com/package/ts-node#h-installation下载ts-node-10.9.2.tgz(192.1 KB)) 清除缓存;npm cache clean --force 更新td-node(Installation # Locally in your project. npm install -D typescript【报错】 npm install -D ts-node【报错】 # Or globally with TypeScript. npm install -g typescript【报错】 npm install -g ts-node)【报错】 更换镜像源;(仍旧是非ali认证,不知是否有环境变量默认了证书路径?)环境变量处未找到? npm config set registry https://registry.npmjs.org/ npm config set registry https://registry.npmmirror.com/ 重启powershell与windows系统; 手动安装; 解压ts-node-10.9.2文件并拷贝至项目目录,运行【报错】,缺少依赖 关闭认证; npm config set strict-ssl false,后运行npm install ts-node --save-dev,仍旧认证【报错】 寻求意见 | 默认路径下未找到ts-node文件,安装成功,但无法使用,不在项目目录中。是否对项目运行有影响? nodejs为exe方式安装在默认系统目录,并不在项目目录中。是否对项目运行有影响? 如何替换现有证书? 不明白参数"instruction": "string"(有哪些可选项?), "incognito": false(是否使用本地LLM?)