fnm
fnm copied to clipboard
Not installing fnm due to missing dependencies
Description
The installation script fails silently when unzip is not present in the system. This can be confusing for users as there's no clear error message indicating the missing dependency.
Current Behavior
When running:
$ sudo curl -fsSL https://fnm.vercel.app/install | bash
Checking dependencies for the installation script...
Checking availability of curl... OK!
Checking availability of unzip... Missing!
Not installing fnm due to missing dependencies.
The installation fails without any clear indication that unzip is required.
Expected Behavior
The installation script should:
- Check if
unzipis installed - If not installed, show a clear error message like:
Error: 'unzip' is required but not installed. Please install it using: - For Debian/Ubuntu: sudo apt-get install unzip - For Fedora: sudo dnf install unzip - For macOS: brew install unzip
System Information
- OS: Ubuntu (or your specific Linux distribution)
- fnm installation method: curl install script
Suggested Solution
Add a dependency check at the beginning of the installation script:
if ! command -v unzip &> /dev/null; then
echo "Error: 'unzip' is required but not installed."
echo "Please install it using your package manager:"
echo "- For Debian/Ubuntu: sudo apt-get install unzip"
echo "- For Fedora: sudo dnf install unzip"
echo "- For macOS: brew install unzip"
exit 1
fi
After running sudo apt-get install unzip, the fnm installation completed successfully. ✅
Now I can use it smoothly.
Thank you,this is helpful to me