tak-bro / aicommit2

A Reactive CLI that generates git commit messages with Ollama, ChatGPT, Gemini, Claude, Mistral and other AI
https://www.npmjs.com/package/aicommit2
MIT License
75 stars 4 forks source link

Error when running `aicommit2 config set GEMINI_KEY=<your key>` #50

Open troublescope opened 5 days ago

troublescope commented 5 days ago

Bug description

When attempting to set the GEMINI_KEY using the command aicommit2 config set GEMINI_KEY=, an error is encountered.

Steps to Reproduce:

  1. Open terminal/command prompt.
  2. Run the command: aicommit2 config set GEMINI_KEY=<your key>.

Error Message:

(node:14544) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created)

aicommit2 version

v1.9.8

Environment

System:
    OS: android
    CPU: Unknown
    Memory: 2.31 GB / 7.43 GB
  Binaries:
    Node: 22.2.0 - /data/data/com.termux/files/usr/bin/node
    npm: 10.7.0 - /data/data/com.termux/files/usr/bin/npm

Can you contribute a fix?

tak-bro commented 3 days ago

Thank you for sharing the issue. I will figure out the issue.

tak-bro commented 3 days ago

this error occurs in node 21 version or later. For now, try older version of Node.js(v20). I think it will take some time to fix the root cause.