Skip to content

scriptAndVersionSettings does not exist #2637

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

Open
1 task done
hffmnn opened this issue May 7, 2025 · 0 comments
Open
1 task done

scriptAndVersionSettings does not exist #2637

hffmnn opened this issue May 7, 2025 · 0 comments

Comments

@hffmnn
Copy link

hffmnn commented May 7, 2025

Confirm this is a Typescript library issue and not an underlying Cloudflare API issue

  • This is an issue with the Typescript library

Describe the bug

Hi,

I'd like to read the environment variables (not the secrets) from a worker script via the SDK. The docs say I have to call client.workers.scripts.scriptAndVersionSettings.get and the response should have a bindings prop. But TS says: Property 'scriptAndVersionSettings' does not exist on type 'Scripts' The runtime says the same: TypeError: Cannot read properties of undefined (reading 'get'). Using latest SDK version 4.2.0.

Any ideas?

To Reproduce

  1. Install the latest version
  2. Try to call e.g.
const scriptAndVersionSetting = await client.workers.scripts.scriptAndVersionSettings.get(
  'this-is_my_script-01',
  { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);

Code snippets

OS

macOS

Runtime version

5.8.3

Library version

v4.2.0

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

No branches or pull requests

1 participant