di-sukharev / opencommit

just a GPT wrapper for git — generate commit messages by an LLM in 1 sec — works best with Claude 3.5 — supports local models too
https://www.npmjs.com/package/opencommit
MIT License
6.19k stars 331 forks source link

[Bug]: ERR_NO_ICU in latest version #133

Closed Poshi closed 1 year ago

Poshi commented 1 year ago

Opencommit Version

opencommit@2.0.0

Node Version

v16.15.1

NPM Version

8.11.0

What OS are you seeing the problem on?

Other Linux Distro

What happened?

I tried to run the oc command after updating to the latest version and now it complains about a missing option. The error message is in the "Relevant log output" field. I checked how NodeJS was compiled, and it used "--with-intl=none" to "to avoid issues with the embedded icu-small library". In older versions it was working, so I'm not sure if it is something you can solve on your end or it is just me and I need to manage to have a NodeJS version compiled without that option.

Expected Behavior

A non-failing execution.

Current Behavior

A failed execution.

Possible Solution

No response

Steps to Reproduce

Install version 2.0.0 and run oc in a folder with some pending change.

Relevant log output

❯ oc
node:internal/encoding:469
          throw new ERR_NO_ICU('"fatal" option');
          ^

TypeError [ERR_NO_ICU]: "fatal" option is not supported on Node.js compiled without ICU
    at new NodeError (node:internal/errors:372:5)
    at new TextDecoder (node:internal/encoding:469:17)
    at node_modules/@dqbd/tiktoken/lite/tiktoken_bg.cjs (/home/user/.local/lib/node_modules/opencommit/out/cli.cjs:15113:29)
    at __require (/home/user/.local/lib/node_modules/opencommit/out/cli.cjs:10:50)
    at node_modules/@dqbd/tiktoken/lite/tiktoken.cjs (/home/user/.local/lib/node_modules/opencommit/out/cli.cjs:15329:16)
    at __require (/home/user/.local/lib/node_modules/opencommit/out/cli.cjs:10:50)
    at Object.<anonymous> (/home/user/.local/lib/node_modules/opencommit/out/cli.cjs:21462:27)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  code: 'ERR_NO_ICU'
}
Poshi commented 1 year ago

I solved it by installing a newer version of NodeJS without disabling ICU.