8bil
How to install legacy-peer-deps while deploying in vercel

How to install legacy-peer-deps while deploying in vercel

11/15/2025Izzaz

The most simple way to let vercel know that you want to install an npm package with legacy dependencies while deploying it to vercel it by doing the following:

Step 1. Create a file and named it .npmrc in the root folder of your project.

Step 2. Inside it add this line:

legacy-peer-deps=true

This simple code will do the following:

➡️ Vercel will automatically read this.

➡️ This forces all installs (local + Vercel) to use legacy peer deps.

#vecel#legacy-peer-deps

← Back to all posts