スキル一覧に戻る
meriley

setup-node

by meriley

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: setup-node description: Sets up Node.js/TypeScript development environment with npm/yarn, dependencies, ESLint, Prettier, testing (Jest/Vitest), and TypeScript type checking. Ensures consistent tooling configuration. Use when starting work on Node.js/TypeScript projects, after cloning repositories, setting up CI/CD, or troubleshooting environment issues. version: 1.0.0

Node.js Development Setup Skill

Purpose

Quickly set up and verify a Node.js/TypeScript development environment with all necessary tooling.

Workflow

Quick Setup Checklist

  1. ✅ Verify Node.js 18+ and npm 9+
  2. ✅ Detect package manager (npm/yarn/pnpm)
  3. ✅ Install dependencies
  4. ✅ Verify package.json scripts
  5. ✅ Setup ESLint
  6. ✅ Setup Prettier
  7. ✅ Setup TypeScript (if applicable)
  8. ✅ Setup Testing (Jest/Vitest)
  9. ✅ Setup Git hooks (Husky + lint-staged)
  10. ✅ Verify build
  11. ✅ Run quality checks
  12. ✅ Test execution

For detailed step-by-step instructions with commands and troubleshooting, see references/DETAILED-WORKFLOW.md.

Common Node.js Commands Reference

Package Management

npm install <package>         # Install package
npm install -D <package>      # Install as dev dependency
npm install -g <package>      # Install globally
npm uninstall <package>       # Remove package
npm update                    # Update all packages
npm outdated                  # Check for outdated packages
npm audit                     # Security audit
npm audit fix                 # Auto-fix vulnerabilities

Project Commands

npm run dev                   # Development server
npm run build                 # Production build
npm test                      # Run tests
npm run lint                  # Lint code
npm run format                # Format code

Yarn Equivalents

yarn add <package>            # Install package
yarn add -D <package>         # Install as dev dependency
yarn remove <package>         # Remove package
yarn upgrade                  # Update all packages
yarn audit                    # Security audit

Troubleshooting

Issue: "npm: command not found"

Solution: Node.js not installed

# macOS
brew install node

# Or use nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install node

Issue: "Cannot find module 'X'"

Solution: Dependencies not installed

rm -rf node_modules package-lock.json
npm install

Issue: "EACCES: permission denied"

Solution: Global npm permissions issue

# Fix npm permissions (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH

# Add to ~/.bashrc or ~/.zshrc
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc

Issue: "TypeScript errors in node_modules"

Solution: Skip library checking

// tsconfig.json
{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

Issue: "ESLint and Prettier conflicts"

Solution: Install eslint-config-prettier

npm install --save-dev eslint-config-prettier

Add to .eslintrc.js:

extends: [
  // ... other configs
  'prettier', // Must be last
],

Best Practices

  1. Use Node version manager (nvm) - Easily switch Node versions
  2. Lock dependency versions - Commit package-lock.json
  3. Separate dev dependencies - Use --save-dev for tooling
  4. Enable TypeScript strict mode - Catch more errors
  5. Configure ESLint + Prettier - Consistent code style
  6. Use git hooks - Automate checks with Husky
  7. Target 90%+ coverage - Comprehensive testing
  8. Regular security audits - Run npm audit frequently

Integration with Other Skills

This skill may be invoked by:

  • quality-check - When checking Node.js code quality
  • run-tests - When running Node.js tests

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です