As recently ,i tried to add release configuration for workflow scheduling but during release configuration it throws error API request error: Failed to fetch npmrc environment variables.Everytime when i try to create release.i configured .npmrc file in cloudshell with updated NPM_TOKEN but still getting error
Hi @rafaykpmg,
Welcome to Google Cloud Community!
The most likely reason you're getting the "Failed to fetch npmrc environment variables" error, even after configuring .npmrc in Cloud Shell, is that Dataform's execution environment cannot access your Cloud Shell configuration.
A straightforward solution is to store your NPM token as a secret within your Dataform environment. You can then easily access it in your Dataform SQLX files using the secrets object, like this: secrets.get("my-npm-token")
. This method is more secure and reliable than using a local .npmrc file.
I hope the above information is helpful.