You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
If ~/.local/lib does not pre-exist, npx githits@latest init will fail #257
The example environment has everything installed with bun.
❯ npx githits@latest init
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /home/jarkko/.local/lib
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat '/home/jarkko/.local/lib'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jarkko/.npm/_logs/2026-08-05T15_03_37_743Z-debug-0.log
Workaround to make the command work is of course mkdir -p ~/.local/lib. However, ending up to this situation was due human error: I was supposed to do bunx githits@latest init but wrote npx by mistake.
What I would recommend as a fix, given that often doing this gives a strong clue of a human error, is to confirm before proceeding further.
To make it smarter and better user experience overall, I would also query for pre-existing bun environment and hint about bun as part of the confirmation, if the environment exists. I.e. couple of versions of confirmation based on environment would be the optimal solution.
Offering to spawn bunx or anything like that would be IMHO overdoing, and does not help with anything.
@jarkkojs, it looks like this could be bug in some old NPM versions: npm/cli#7640. This fails already before githits-cli gets control and workaround is creating that directory, or upgrading NPM. What node + npm version you are getting this with?
Activity
jlitola commentedon Aug 5, 2026
@jarkkojs, it looks like this could be bug in some old NPM versions: npm/cli#7640. This fails already before githits-cli gets control and workaround is creating that directory, or upgrading NPM. What node + npm version you are getting this with?