Prerequisites
Before installing repo2pdf, ensure you have the following installed on your system:- Node.js version 18.0.0 or higher
- git (required only for cloning remote repositories)
Installation methods
- NPX (recommended)
- Clone from source
- Global installation
The fastest way to use repo2pdf is with NPX, which downloads and runs the latest version without requiring installation.
Run with NPX
Execute repo2pdf directly using NPX:This command automatically downloads the latest version from npm and starts the interactive CLI.
Using NPX ensures you always run the latest version without manual updates
Verify installation
To verify that repo2pdf is working correctly, run it with NPX:Troubleshooting
Error: Command not found
Error: Command not found
If you see “command not found” when running
npx repo2pdf, ensure:- Node.js and npm are properly installed
- Your npm installation is in your system PATH
- You have an active internet connection (for NPX to download packages)
Error: Failed to install package
Error: Failed to install package
This usually indicates a network or permissions issue:If using global installation, you may need to use sudo on macOS/Linux:
Error: Node version too old
Error: Node version too old
repo2pdf requires Node.js 18 or higher. Update Node.js:
- Visit nodejs.org to download the latest LTS version
-
Or use a version manager like nvm: