Skip to content

Vercel Deployment Failure - Package Version Compatibility Issue #979

Open

Description

@ulysses-ck

Problem Description

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.

Current Package Versions

  • Next.js: 15.0.4 (experimental/unreleased version)
  • React: 18.3.1 (experimental/unreleased version)
  • React DOM: 18.3.1 (experimental/unreleased version)
  • TypeScript: 5.6.3

Deployment Error Details

Error: Command "npx api install -l ts -y @holded/v1.0#2tq2om5ntgl42 && pnpm install --no-frozen-lockfile" exited with 1

The deployment fails due to:

  • ESLint peer dependency conflicts
  • Unsupported URL Type error with link:dummy.js
  • npm package resolution timeouts
  • Conflicts between different versions of ESLint plugins
  • .api folder not being versioned (git ignored), requiring regeneration on each deploy

Repository

The project repository is available at: https://github.com/ulysses-ck/holded-nextjs/

Activity

  1. ulysses-ck commented on Jan 11, 2025

    @ulysses-ck
    Author

    I get a workaround with this setting in vercel. Also versioning .api folder
    Install Command:

    pnpm install --no-frozen-lockfile && cd .api/apis/holded && npm install && cd ../../..

    Build Command:

    next build

    I'm unsure if this is the best solution. But build time goes from 5m to 1m30s

    Also, is good to versioning .api ?

  2. davidalvarezr commented on Jan 15, 2025

    @davidalvarezr

    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
  3. ulysses-ck commented on Jan 18, 2025

    @ulysses-ck
    Author

    That's a really good solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions