Upgrade Node.js and Fix Breaking Changes
Safely upgrade Node.js to a newer LTS version and resolve compatibility issues.
modernization
upgrade
nodejs
migration
backend
workflow
multi-step
0
Prompt
A systematic approach to upgrading Node.js while handling breaking changes and deprecated APIs. ## Steps: 1. Check current Node.js version: node -v 2. Review Node.js release notes for breaking changes between versions. 3. Update .nvmrc or package.json engines field to target new Node version. 4. Install new Node version: nvm install 20 (or desired version) 5. Run tests and identify failures caused by breaking changes. 6. Ask Copilot: 'Update this code to be compatible with Node.js 20' for failing modules. 7. Update deprecated APIs (e.g., crypto.createCipher → crypto.createCipheriv). 8. Check native dependencies: rebuild native modules with npm rebuild. 9. Update Docker base image and CI/CD pipelines to use new Node version. 10. Deploy to staging, monitor for runtime errors, then roll out to production.