You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vercel Deployment Failure - Package Version Compatibility Issue #979
The current project is failing to deploy on Vercel due to incompatible package versions and dependency resolution issues. The main failure occurs during the installation of the Holded API client and its dependencies. Additionally, the .api folder is git ignored, which means the Holded API client needs to be regenerated during each deployment.
I think the problem is that the api package tries to install the dependency with npm instead of pnpm
I ended up doing the following:
version the .api folder (without its node_modules)
added this under package.json > scripts: "preinstall": "npm --prefix ./.api/apis/my-api install"
Then, when I do a pnpm i, it correctly installs the node_modules in the api folder and then the node_modules in the main package
Activity
ulysses-ck commentedon Jan 11, 2025
I get a workaround with this setting in vercel. Also versioning
.apifolderInstall Command:
Build Command:
I'm unsure if this is the best solution. But build time goes from 5m to 1m30s
Also, is good to versioning
.api?davidalvarezr commentedon Jan 15, 2025
I think the problem is that the
apipackage tries to install the dependency withnpminstead ofpnpmI ended up doing the following:
.apifolder (without its node_modules)package.json > scripts:"preinstall": "npm --prefix ./.api/apis/my-api install"Then, when I do a
pnpm i, it correctly installs the node_modules in the api folder and then the node_modules in the main packageulysses-ck commentedon Jan 18, 2025
That's a really good solution