Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix package.json#packageManager to correct pnpm version #2046

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

onsclom
Copy link

@onsclom onsclom commented Feb 19, 2025

Dub currently fails to build with pnpm@8.6.10. This PR upgrades package.json#packageManager to a version that succeeds.

Why Vercel builds currently succeed

package.json#packageManager is ignored on Vercel when corepack is not enabled. Instead, the pnpm-lock.yaml is detected as a lockfile generated by pnpm@9, so pnpm@9.15.5 is used.

Why pnpm@8.6.10 builds fail

The existing pnpm-lock.yaml is version 9. This means it was generated by pnpm 9 or 10, and it can only be read by pnpm 8. pnpm 8 ignores it, upgrades typescript from 5.4.4 -> 5.6.2, and the build fails due to a type error:

web:build: ./app/api/analytics/route.ts:26:68
web:build: Type error: Argument of type '{}' is not assignable to parameter of type '"os" | "count" | "timeseries" | "continents" | "regions" | "countries" | "cities" | "devices" | "browsers" | "trigger" | "triggers" | "referers" | "referer_urls" | "top_links" | ... 5 more ... | "utm_contents"'.

When package.json#packageManager matters

package.json#packageManager is used when corepack is enabled OR when pnpm 10 is used.

Copy link

vercel bot commented Feb 19, 2025

@onsclom is attempting to deploy a commit to the Dub Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Feb 19, 2025

CLA assistant check
All committers have signed the CLA.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants