Skip to content

Dependencies cannot be installed in version 3.6.0 #264

@tomaco-gojiraf

Description

@tomaco-gojiraf

I was deploying normally and suddenly my pipeline started to fail, and it just happened to coincide with the release of the new action version (3.6.0).
It fails when trying to install the package.json dependencies throwing an error that it cannot resolve the dependency. The error is thrown on the import line of the code and advises you to mark it as external to fix it, but this sounded strange to me because it was already working this way.

✘ [ERROR] Could not resolve "@tsndr/cloudflare-worker-jwt"

src/auth/validate-token.ts:1:23:
1 │ import { verify } from '@tsndr/cloudflare-worker-jwt';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can mark the path "@tsndr/cloudflare-worker-jwt" as external to exclude it from the bundle, which will remove this error.

The same error happens with zod dependency:

Could not resolve "zod"

Using the action version 3.5.0 fixed the problem quickly.

I also tried using bun as a package manager thinking it might be a npm problem, but it didn't fix anything.

GitHub Action:

name: Deploy Production

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    environment: production
    steps:
      - uses: actions/checkout@v4

      - name: Deploy
        uses: cloudflare/wrangler-action
        with:
          apiToken: ${{ secrets.CF_API_TOKEN }}
          accountId: ${{ secrets.CF_ACCOUNT_ID }}
          wranglerVersion: 3.57.1
          secrets: |
            SECRET_KEY
        env:
          SECRET_KEY: ${{ secrets.SECRET_KEY }}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions