-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cannot update environment variable on netlify site during build time #9
Comments
I've tried to fix it but unfortunatelly not that easy to get the account_id, some DNS setting endpoints returning it but returned me [] most likely cause I don't have other than default settings for now. I hope someone would have some idea how to find the account_id and complete the script:
https://open-api.netlify.com/#tag/environmentVariables/operation/setEnvVarValue Also it would be good if we could set query parameters for site_id, but the netlify library seems like not supporting right now. |
`❯ Loading plugins
@vgs/netlify-plugin-vgs (onPreBuild event)
────────────────────────────────────────────────────────────────
[vgs-plugin] onPreBuild, vaultId: xxx
[vgs-plugin] collectRouteExists: true
[vgs-plugin] netlify updateSite
[vgs-plugin] adding env variable VGS_ROUTE_ID xxx
[vgs-plugin] netlify updateSite error: TextHTTPError: Bad Request
at parseJsonResponse (file:///C:/Users/arpad/OneDrive/Asztali%20g%C3%A9p/react/predictor_web_ui/node_modules/netlify/src/methods/response.js:37:35)
at parseResponse (file:///C:/Users/arpad/OneDrive/Asztali%20g%C3%A9p/react/predictor_web_ui/node_modules/netlify/src/methods/response.js:9:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async callMethod (file:///C:/Users/arpad/OneDrive/Asztali%20g%C3%A9p/react/predictor_web_ui/node_modules/netlify/src/methods/index.js:31:26)
at async onPreBuild (file:///C:/Users/arpad/OneDrive/Asztali%20g%C3%A9p/react/predictor_web_ui/node_modules/@vgs/netlify-plugin-vgs/index.js:30:7)
at async Object.run (file:///C:/.npm-global/node_modules/netlify-cli/node_modules/@netlify/build/lib/plugins/child/run.js:14:5)
at async handleEvent (file:///C:/.npm-global/node_modules/netlify-cli/node_modules/@netlify/build/lib/plugins/child/main.js:28:42)
at async process. (file:///C:/.npm-global/node_modules/netlify-cli/node_modules/@netlify/build/lib/plugins/ipc.js:91:24) {
status: 400,
data: 'Site using new environment variables experience. Cannot update environment variables via Sites API. See https://open-api.netlify.com/#tag/environmentVariables'
}
[vgs-plugin] netlify updateSite finished!
(@vgs/netlify-plugin-vgs onPreBuild completed in 3.7s)`
The text was updated successfully, but these errors were encountered: