@actions/cache v4.0.4 import error (original) (raw)
Describe the bug
When importing @actions/cache@v4.0.4 there's a "cannot find module" error for @protobuf-ts/runtime-rpc.
Unhandled error: Error: Cannot find module '@protobuf-ts/runtime-rpc'
Require stack:
- /home/runner/work/private-workflows/private-workflows/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js
- /home/runner/work/private-workflows/private-workflows/node_modules/@actions/cache/lib/generated/results/api/v1/cache.twirp-client.js
- /home/runner/work/private-workflows/private-workflows/node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js
- /home/runner/work/private-workflows/private-workflows/node_modules/@actions/cache/lib/cache.js
- /home/runner/work/_actions/actions/github-script/60a0d83039c74a4aee543508d2ffcb1c3799cdea/dist/index.js
To Reproduce
yarn add @actions/cache@4.0.4node -e 'require("@actions/cache")'
Expected behavior
The package should be importable.
Screenshots
N/A
Desktop (please complete the following information):
N/A
Additional context
This was likely broken in #2106 - there's a runtime dependency on @protobuf-ts/runtime-rpc (possibly other packages as well) which was broken when @protobuf-ts/plugin was moved to a dev dependency.
cc @Link-