Documentation Index
Fetch the complete documentation index at: https://mintlify.com/queaxtra/zvelte/llms.txt
Use this file to discover all available pages before exploring further.
Common Issues
This guide covers common problems you might encounter when using Zvelte and how to resolve them.Git clone failed with code 128
Git clone failed with code 128
Error Message:Cause:This error occurs when Git cannot clone the template repository. Common reasons include:
- Git is not installed on your system
- No internet connection or network issues
- GitHub is unreachable
- Repository URL is blocked by firewall
-
Verify Git is installed:
If not installed, download from git-scm.com
-
Check your internet connection:
-
Try cloning the template manually to diagnose:
-
If behind a proxy, configure Git:
Directory already exists and is not empty
Directory already exists and is not empty
Error Message:Cause:You’re trying to create a project in a directory that already exists and contains files. Zvelte prevents accidental overwrites by refusing to proceed.Solution:Choose one of the following options:
-
Use a different directory name:
-
Remove the existing directory:
-
Use the current directory syntax (if you want to merge):
Conflicting files detected when using current directory
Conflicting files detected when using current directory
Error Message:Cause:When using
. to create a project in the current directory, Zvelte detects files that would be overwritten by the template. This is from the handleCurrentDirMerge function that compares existing files with template files.Solution:-
Move or rename conflicting files:
-
Use a subdirectory instead:
-
Start in an empty directory:
Package manager not found warning
Package manager not found warning
Warning Message:orCause:The specified package manager (or any package manager) is not available on your system. Zvelte checks availability using
<pm> --version.Solution:-
Install the package manager:
For Bun:
For pnpm:For npm (comes with Node.js):For Yarn:
-
Verify installation:
-
Install dependencies manually:
If you prefer to skip automatic installation:
Path traversal detected in project directory
Path traversal detected in project directory
Error Message:Cause:The project directory path contains potentially malicious path traversal patterns (e.g.,
../, symbolic links, or unusual path normalization). This is a security feature in the validateTargetDir function.Solution:-
Use a simple directory name:
-
Avoid special path characters:
- Don’t use
../in the path - Avoid symbolic links
- Use straightforward directory names
- Don’t use
-
Use absolute paths:
Invalid project directory provided
Invalid project directory provided
Error Message:Cause:The project directory argument is missing, empty, or not a valid string.Solution:Make sure to provide a directory name:Or use
. for the current directory:Dependency installation failed with code 1
Dependency installation failed with code 1
Error Message:Cause:The package manager encountered an error while installing dependencies. This can happen due to:
- Network connectivity issues
- Registry unavailable (npm, yarn)
- Corrupted package cache
- Incompatible Node.js version
- Disk space issues
-
Check Node.js version:
Ensure you’re using a supported version (check
package.jsonforenginesfield) -
Clear package manager cache:
-
Try installing manually:
-
Check available disk space:
Failed to remove .git directory
Failed to remove .git directory
Error Message:Cause:After cloning the template, Zvelte attempts to remove the
.git directory but encounters a permission error or file lock.Solution:-
Check file permissions:
-
Remove manually with elevated permissions:
-
Close any programs accessing the directory:
- IDEs (VS Code, WebStorm)
- File explorers
- Git GUI clients
The project will still be functional even if the
.git directory removal fails. You can initialize a new Git repository afterwards:Command not found: bunx
Command not found: bunx
Error Message:Cause:Bun is not installed on your system, or it’s not in your PATH.Solution:
-
Install Bun:
-
Verify installation:
-
Alternative: Use npx instead:
-
Add Bun to PATH (if installed but not found):
Getting Help
If you encounter an issue not covered here:-
Check the help message:
- Review the error message carefully - it often contains specific details about what went wrong
-
Open an issue on the GitHub repository with:
- Complete error message
- Command you ran
- Operating system and version
- Node.js and package manager versions
Debugging Tips
Most errors in Zvelte include colored output:
- Yellow: Warnings (non-fatal)
- Red: Errors (fatal)
- Blue: Information messages
- Green: Success messages