-
Notifications
You must be signed in to change notification settings - Fork 157
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
v3 does not work with other package managers #156
Comments
Had to downgrade one of my dependencies as it was a peer dependency issue. Error only occurs with |
Same here, since upgraded to v3 of the action, the deploy action fails with:
We are using |
Hmm, I can look into making it package agnostic and fallback to npm or pnpm (honestly I prefer pnpm myself too lol) |
I deployed successfully without wrangler-action, this is my config. You can install wrangler on your deploy step or add it into you package.json. - name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN}}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID}}
run: |
pnpm install --save-dev wrangler
pnpm exec wrangler pages deploy public --project-name=<Your project name> |
Just ran into this myself. With the current state of
It's worth noting that it works fine with yarn v3. Discovered this bug as I moved to pnpm. |
@JacobMGEvans this may not be resolved. Just tied to test the fix by using Run cloudflare/wrangler-action@main
with:
accountId: ***
apiToken: ***
wranglerVersion: latest
preCommands: echo "*** pre commands ***"
wrangler r2 bucket create turborepo-cache || true
echo "******"
command: deploy
quiet: false
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
Error: File not found: '/home/runner/work/_actions/cloudflare/wrangler-action/main/dist/index.mjs' Looks like it's able to detect pnpm but there is some bug with executing index.mjs? Here is the link to the failing action in case that helps. |
I'm pretty sure I haven't released this fix yet. |
Hmm my apologies then. I assumed #166 was the complete fix. I was able to use by using the |
|
Right, that makes sense! My bad 😅 |
Just an FYI I just got this on my recent deployment and noticed this work was just merged into release
|
@hubertott Please try the following - uses: cloudflare/wrangler-action@v3
with:
packageManager: "npm" # change npm to yarn or pnpm |
@nix6839 thanks for that.
In our case we use a mono-repo structure where the yarn install process happens at the root level. We are also specifying the working directory of the worker files. All in all our folder structure doesn't play well with the auto-detect. Feels like the error message could be a little more informative. Like you suggestion of setting the packageManager. |
Sorry, I didn't document when I contributed. A short description of the feature:
|
Currently getting the following error thrown
npm ERR! Cannot read properties of null (reading 'matches')
in https://github.com/zanechua/comment-worker/actions/runs/5857501953/job/15879483256Seems to be an incompatibility since I am using
pnpm
instead ofnpm
?Can we have support for making use of other package managers to install wrangler other than
npm
?The text was updated successfully, but these errors were encountered: