Installation
This guide will help you set up your development environment and get the TypeScript Project Template running on your machine.
Prerequisites
Before you begin, ensure you have the following installed:
Node.js
- Node.js 18 or higher (Node.js 20 recommended)
- npm (comes with Node.js) or yarn
You can download Node.js from nodejs.org or use a version manager:
bash
# Using nvm (recommended)
nvm install 20
nvm use 20
# Using fnm
fnm install 20
fnm use 20
# Verify installation
node --version # Should be 18.x or higher
npm --version # Should be 9.x or higher
Git
- Git for version control
- Download from git-scm.com
Code Editor (Recommended)
- Visual Studio Code with TypeScript support
- WebStorm or other TypeScript-aware IDE
Getting the Template
Option 1: Clone the Repository
bash
# Clone the template repository
git clone https://github.com/almai/typescript-augment-setup.git my-project
# Navigate to your project
cd my-project
# Remove the original git history (optional)
rm -rf .git
git init
Option 2: Download as ZIP
- Go to GitHub repository
- Click "Code" → "Download ZIP"
- Extract to your desired location
- Rename the folder to your project name
Option 3: Use as Template
- Go to GitHub repository
- Click "Use this template" → "Create a new repository"
- Clone your new repository
Install Dependencies
Once you have the template, install the dependencies:
bash
# Install all dependencies
npm install
# Or using yarn
yarn install
This will install:
- Production dependencies: winston (logging example)
- Development dependencies: TypeScript, ESLint, Prettier, Jest, tsx, and more
Verify Installation
Run the verification commands to ensure everything is set up correctly:
bash
# Check if TypeScript compilation works
npm run build
# Run the test suite
npm test
# Run quality checks (linting + formatting + tests)
npm run check
# Start development mode
npm run dev:tsx
If all commands complete successfully, you're ready to start developing! 🎉
IDE Setup
Visual Studio Code
Install these recommended extensions:
json
{
"recommendations": [
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode",
"ms-vscode.vscode-eslint",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-json"
]
}
Settings
Add these settings to your VS Code workspace:
json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["typescript"],
"typescript.preferences.importModuleSpecifier": "relative"
}
Troubleshooting
Common Issues
Node.js version too old
bash
# Update Node.js to version 18 or higher
nvm install 20
nvm use 20
Permission errors on npm install
bash
# Fix npm permissions (macOS/Linux)
sudo chown -R $(whoami) ~/.npm
# Or use a Node version manager (recommended)
TypeScript compilation errors
bash
# Clear TypeScript cache
rm -rf node_modules/.cache
npm run build
Jest tests failing
bash
# Clear Jest cache
npm test -- --clearCache
npm test
Getting Help
If you encounter issues:
- Check the troubleshooting guide
- Search existing issues
- Create a new issue with:
- Your operating system
- Node.js version (
node --version
) - npm version (
npm --version
) - Error messages and stack traces
Next Steps
Now that you have the template installed:
- Quick Start - Run your first commands
- Project Structure - Understand the template layout
- Development Workflow - Learn the development process