Hi everyone,
I'm running into an issue when deploying my app on Vercel. Locally, everything works fine, but on Vercel, the deployment fails during npm install.
Here’s the error log:
npm ERR! code 128 npm ERR! An unknown git error occurred npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/xxx/workflow-builder.git npm ERR! Warning: Permanently added 'github.com' (ED25519) to the list of known hosts. npm ERR! git@github.com: Permission denied (publickey). npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists. npm ERR! A complete log of this run can be found in: /vercel/.npm/_logs/2025-01-21T03_16_04_372Z-debug-0.log The issue seems to be related to a private library I have in the project (workflow-builder). It's not published on the npm registry but is linked as a GitHub dependency in package.json. Locally, npm install works and downloads the library correctly. However, on Vercel, it fails, even though I’ve set up a .npmrc configuration file.
Here is my package.json declaration: "/workflow-builder": "git+ssh://git@github.com/xxxx/workflow-builder.git#main",
Here’s what I’ve tried so far:
- Confirmed that the
.npmrcfile is correctly configured with my GitHub token. - Verified that the token has the correct permissions (read access to the repository).
- Tested the GitHub dependency locally, and it works as expected.
Despite this, the deployment on Vercel still fails. Has anyone encountered this specific issue with private GitHub dependencies on Vercel? Any tips on resolving it?