Troubleshooting
Common Issues
# Using nvm (Node Version Manager) nvm install 16 nvm use 16 # Or download directly from nodejs.org
npm cache clean --force # or yarn cache cleanrm -rf node_modules rm package-lock.json # or yarn.lock npm install # or yarn install# Configure npm to use a different registry npm config set registry https://registry.npmjs.org/ # Or use a different DNS npm config set dns_server 8.8.8.8
PORT=3001 npm start# On Unix-based systems lsof -i :3000 kill -9 <PID> # On Windows netstat -ano | findstr :3000 taskkill /PID <PID> /F
// Add type assertion const value = someValue as ExpectedType; // Use type guard if (isExpectedType(someValue)) { // TypeScript knows the type here } // Update type definition interface MyType { property: string; }
export NODE_OPTIONS=--max-old-space-size=4096
Last updated