npm install --only=production code example Example: npm install production only # Set NODE_ENV=production # OR npm install --production