Error When Deploying to Vercel Sonatype Nexus Repository Manager

This is an error I get when I try to deploy on Vercel, I tried addinga .npmrc but did not work, I am not sure why vercel deployment cannot download the packages. The packages can be downloaded on local device no problem, the local dev also runs. Please Help.

npm ERR! code E401
npm ERR! Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
npm ERR! A complete log of this run can be found in:
npm ERR!     /vercel/.npm/_logs/2023-06-26T20_14_34_337Z-debug-0.log
Error: Command "npm install" exited with 1
BUILD_UTILS_SPAWN_1: Command "npm install" exited with 1

worked after I deleted package-lock.json. But I still struggle why I need to delete the package-lock.

How did you initiate your deployment to vercel