yamadashy / repomix

📦 Repomix (formerly Repopack) is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, and Gemini.
MIT License
4.36k stars 202 forks source link

Unable to use repopack in ubuntu 20.04 #146

Open beishanyangjin opened 3 weeks ago

beishanyangjin commented 3 weeks ago

Unable to use repopack in ubuntu 20.04 I install npm just by "sudo apt install npm", then either just run "npx repopack" or installed by npm then run "repopack", it get this error (node:52216) UnhandledPromiseRejectionWarning: Error: Not supported at /usr/local/lib/node_modules/repopack/bin/repopack.cjs:5:19 at Object. (/usr/local/lib/node_modules/repopack/bin/repopack.cjs:7:3) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) (node:52216) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:52216) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

ItsCurstin commented 3 weeks ago

@beishanyangjin

I was able to run it on ubuntu 24.10 with no issues. I don't know if it is specific to 20.04.

Check your node version. The version I use is 23.0.0.

Also I did install it repopack with pnpm but this shoulnt impact the run repopack command from failing

yamadashy commented 3 weeks ago

Hi, @beishanyangjin ! Thank you for reporting.

The combination of Ubuntu 20.04 and Node.js 16 has passed our tests:

The issue might be caused by either a lower Node.js version or some environment-specific condition. Could you please provide more detailed information about your environment, such as:

  1. Your Node.js version (node --version)
  2. Your OS version (output of lsb_release -a)
  3. How you installed repomix (npm install -g, npx, etc.)
plindman commented 2 weeks ago

Got as well this UnhandledPromiseRejectionWarning: Error: Not supported This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) node_modules/repopack/bin/repopack.cjs:5:19

node --version : v10.19.0 # this is the version apt install nodejs gave. Feels far off from v23 🤔 Description: Ubuntu 20.04.6 LTS npm install -g repopack

UPDATE: upgrade to 24.04 and node v18. issue gone with the wind