-
-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Fatal Error when running on MacOS #193
Comments
Hi, @Malaeu ! I tried reproducing with the exact same environment (MacOS, Node v22.12.0, NPM v10.9.0) but couldn't replicate the error. To help track this down, could you share:
This will help us identify and fix the root cause. Thanks for helping improve Repomix! |
I just asked o1 pro about this problem and here is the response: Clipboardy Issue on macOS with RepomixThe root issue here is that
Below are a few details and workarounds: 1. Why This Happens
2. Workarounds to Get Repomix Running1. Disable Clipboard CopyIf you don’t actually need Repomix to copy the output to your clipboard, you can turn that off. Repomix only attempts to import and call clipboardy if
{
"output": {
"copyToClipboard": false
}
}
Just don’t pass This prevents Repomix from needing clipboardy at all, avoiding the Windows code path entirely. 2. Try a Different Node VersionBecause Node.js 22.x is not yet an official LTS or stable release, you could try Node 20.x or 18.x to see if the problem goes away. Some older modules or environment detection code might not handle 22.x well. 3. Ensure macOS Tools Are in PATHCheck that which sysctl If it prints something like 4. Install a Different Clipboardy Version (Advanced)If you absolutely need to keep
However, this can get messy quickly. 5. Open a GitHub IssueIf none of the above help, please open an issue on the Repomix repo or clipboardy repo. Provide:
3. Summary
This should unblock you from the fatal error on macOS and let Repomix run successfully. If it continues, consider opening a detailed issue for further debugging. |
Wau! Thx so much! |
Environment:
Error:
spawnSync sysctl ENOENT
The package tries to load Windows-specific code (clipboardy/lib/windows.js) on MacOS, causing fatal error. This happens both with global npm install and npx.
Steps to reproduce:
npm install -g repomix
ornpx repomix
repomix --version
The text was updated successfully, but these errors were encountered: