Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: vercel is not detected while using yarn 1.22.22 and Nx monorepo #916

Open
1 task
michalvadak opened this issue Dec 6, 2024 · 0 comments
Open
1 task
Labels
bug Something isn't working

Comments

@michalvadak
Copy link

next-on-pages environment related information

System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.6.0: Thu Sep 12 23:35:10 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_ARM64_T6030
CPU: (12) arm64 Apple M3 Pro
Memory: 18 GB
Shell: /bin/zsh
Package Manager Used: npm (10.2.3)

Relevant Packages:
@cloudflare/next-on-pages: 1.13.6
vercel: 39.1.1
next: ^14.2.20

Description

While using yarn with Nx monorepo the vercel isn't picked up by next-on-pages script while with using npm it works fine. I'd like to stick to yarn as we use it everywhere.

Nx monorepo structure:

-- apps
    -- next-js
-- libs

I have installed vercel@39.1.1 in the root package.json and it isn't picked up by next-on-pages and results in adding vercel@39.1.3 which doesn't work for me at the moment. I've also tried adding vercel@39.1.1 in apps/next-js/package.json but it isn't detected as well.

Fix with @cloudflare/next-on-pages: 1.13.6 doesn't work for me as described here: #915

Reproduction

  1. Setup Nx monorepo with NextJS project
  2. Install @cloudflare/next-on-pages: 1.13.6
  3. Setup targets for next-js app with:
    "pages-build": {
      "executor": "nx:run-commands",
      "options": {
        "command": "../../node_modules/.bin/next-on-pages",
        "cwd": "apps/next-js"
      }
    },
  1. Run nx pages-build next-js
> nx run next-js:pages-build

> ../../node_modules/.bin/next-on-pages

⚡️ @cloudflare/next-on-pages CLI v.1.13.6
⚡️ Detected Package Manager: yarn (1.22.22)
⚡️ Preparing project...
⚡️ Project is ready
⚡️ vercel dev dependency missing, installing vercel as a dev dependency with 'yarn add vercel -D'...

yarn add v1.22.22

Pages Deployment Method

Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)

Pages Deployment ID

No response

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@michalvadak michalvadak added the bug Something isn't working label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant