Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

wrangler: not found (npx error in pnpm repository) #75

Open
aaronadamsCA opened this issue Mar 27, 2023 · 3 comments
Open

wrangler: not found (npx error in pnpm repository) #75

aaronadamsCA opened this issue Mar 27, 2023 · 3 comments

Comments

@aaronadamsCA
Copy link
Contributor

After switching our repository from Yarn to pnpm, npx wrangler@2 fails to download Wrangler. If there is a local Wrangler v2 dependency, the action will run it, but otherwise it fails.

image

(Yes that's a screenshot of a fork, but it's not behind any commits.)

Our workaround for now will be to install Wrangler in each package that needs to run this action.

@vaknir
Copy link

vaknir commented Mar 29, 2023

Hey,
You might want to try changing your image from ubuntu-latest to ubuntu-20.04 and adding the environment variable NODE_VERSION with 18.15.0.

@aaronadamsCA
Copy link
Contributor Author

We've already managed to work around this with the local package dev dependency, it's just interesting that npx breaks under pnpm.

Some potential solutions:

I'd be happy to give any of these a shot in a PR.

@WalshyDev
Copy link
Member

Hmm, this is fun...

We do have an unstable publish API now exposed we could use - https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/api/pages/publish.tsx

This supports all the options we currently support + #76 which is nice

I'll need to play around with it and see if we can make it work nicely.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants