JohannLai / gptcli

🔥 All in one ChatGPT CLI, build your own AI cli tools just like GitHub Actions workflow gptcli. 内置 AI commmit(自动生成 commit message)、AI Command(自然语言转命令行)、翻译、gitmoji 等插件。秒级创建任意自定义 ChatGPT CLI 工具,就像创建一个 GitHub Actions 这么简单,让 AI 帮助我们链接自然语言和结构化数据。
https://www.gptcli.com
MIT License
255 stars 13 forks source link

Install the package fail when use the root in centos #4

Open k-water opened 1 year ago

k-water commented 1 year ago

cmd: sudo npm install -g @johannlai/gptcli

npm ERR! code 1
npm ERR! path /usr/local/node16/lib/node_modules/@johannlai/gptcli
npm ERR! command failed
npm ERR! command sh -c node scripts/createConfig.js
npm ERR! node:fs:1349
npm ERR!   handleErrorFromBinding(ctx);
npm ERR!   ^
npm ERR! 
npm ERR! Error: EACCES: permission denied, mkdir '/root/.config/gpt-cli'
npm ERR!     at Object.mkdirSync (node:fs:1349:3)
npm ERR!     at file:///usr/local/node16/lib/node_modules/@johannlai/gptcli/scripts/createConfig.js:12:6
npm ERR!     at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
npm ERR!     at async Promise.all (index 0)
npm ERR!     at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
npm ERR!     at async loadESM (node:internal/process/esm_loader:88:5)
npm ERR!     at async handleMainPromise (node:internal/modules/run_main:61:12) {
npm ERR!   errno: -13,
npm ERR!   syscall: 'mkdir',
npm ERR!   code: 'EACCES',
npm ERR!   path: '/root/.config/gpt-cli'
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-03-21T08_34_26_841Z-debug-0.log