Skip to content
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

@google-cloud/secret-manager SecretManagerServiceClient.secretVersionPath throws a type error #5319

Closed
dicearr opened this issue May 7, 2024 · 3 comments · Fixed by #5333

Comments

@dicearr
Copy link

dicearr commented May 7, 2024

Environment details

  • which product (packages/*): @google-cloud/secret-manager@5.5.0
  • OS: Darwin 21.6.0 Darwin Kernel Version 21.6.0
  • Node.js version: v19.6.1
  • npm version: 9.4.0
  • google-cloud-node version:

Steps to reproduce

import { SecretManagerServiceClient } from '@google-cloud/secret-manager';

const secretManager = new SecretManagerServiceClient();

secretManager.secretVersionPath('the-project-id', 'the-secret-name', 'latest'); // Throws

The provided code snippet throws the following error:

/path/to/project/node_modules/@google-cloud/secret-manager/build/src/v1/secret_manager_service_client.js:1161
        return this.pathTemplates.secretVersionPathTemplate.render({
                                                            ^
TypeError: Cannot read properties of undefined (reading 'render')
    at SecretManagerServiceClient.secretVersionPath (/path/to/project/node_modules/@google-cloud/secret-manager/build/src/v1/secret_manager_service_client.js:1161:61)
    ...

Seems to me that this pull-request (5e14553) could've broken the secretVersionPath method, as there is no secretVersionPathTemplate in the pathTemplates.

@jacopofranza
Copy link

same problem here

@DanielLoyAugmedix
Copy link

Same issue for my team. This is a blocker.

@Red-Pandaz
Copy link

I just encountered this problem. Was able to get around it by using 5.3.0 instead. I'll get the latest version once this is fixed.

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

Successfully merging a pull request may close this issue.

4 participants