cloudflare / wrangler-action

🧙‍♀️ easily deploy cloudflare workers applications using wrangler and github actions
Apache License 2.0
1.26k stars 159 forks source link

docs: add warning about packageManager config #242

Closed capaj closed 8 months ago

capaj commented 8 months ago

just something I bumped into today

image

Cherry commented 8 months ago

@petebacondarwin This is inferred by https://github.com/cloudflare/wrangler-action/pull/190 and then fixed in https://github.com/cloudflare/wrangler-action/pull/193, and I'm not really sure the "default" copy/pasted config should use pnpm - that's definitely not the standard.

"The package manager you'd like to use to install and run wrangler. If not specified, the preferred package manager will be inferred based on the presence of a lockfile or fallback to using npm if no lockfile is found. Valid values are npm | pnpm | yarn | bun."

You do not need to specify packageManager as the docs now suggests, as long as you're running an up to date version.

Cherry commented 8 months ago

The detection of pnpm looks for a pnpm-lock.yaml file in the working directory, but only after looking for a package-lock.json, and then a yarn.lock.

If you have a pnpm-lock.yaml committed, and none of these other files, it should work as expected.