idootop / mi-gpt

🏠 将小爱音箱接入 ChatGPT 和豆包,改造成你的专属语音助手。
MIT License
7.86k stars 817 forks source link

在ubuntu系统上跑启动命令也报错 #192

Closed fsankk closed 1 month ago

fsankk commented 1 month ago

➜ mi-gpt sudo docker logs --details -f 7c9432e1a09e

mi-gpt@4.2.0 start node ./app.js

node:internal/modules/esm/resolve:259 throw new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base), String(resolved)); ^

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/app/.migpt.js' is not supported resolving ES modules imported from /app/app.js at finalizeResolution (node:internal/modules/esm/resolve:259:11) at moduleResolve (node:internal/modules/esm/resolve:933:10) at defaultResolve (node:internal/modules/esm/resolve:1157:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38) at ModuleWrap. (node:internal/modules/esm/module_job:87:39) at link (node:internal/modules/esm/module_job:86:36) { code: 'ERR_UNSUPPORTED_DIR_IMPORT', url: 'file:///app/.migpt.js' }

ryanqy commented 1 month ago

看起来可能是因为你运行 docker 命令的路径下没有 .migpt.js 文件导致的。

idootop commented 1 month ago

楼上正解。