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

norska init fails with new Netlify websites #166

Open
pixelastic opened this issue Apr 27, 2023 · 0 comments
Open

norska init fails with new Netlify websites #166

pixelastic opened this issue Apr 27, 2023 · 0 comments

Comments

@pixelastic
Copy link
Owner

Netlify updated their API to reflect the way one can update a site ENV variables. Previously (what they refer to as the "Classic env variable experience", one could update a site ENV variables through the Site endpoint (what norska-netlify uses).

It now has a specific /env endpoint to configure ENV variables. Note that the new experience is richer: ENV variables can be defined at the account level as well as site level, and can be scoped to deploy preview/production/etc.

Norska should be updated to:

  • Detect if runs on the Classic or New experience. Maybe we can get this information from the site details. Or we'll have to try doing a call, catch a potential error and fallback to the other.
  • Run the appropriate code depending on the version

Temporary workaround: Manually update the env variables through the UI. Check the configureSite in norska-netlify/lib/enable.js. It creates the newVars variable that contain the list of all env variables to add.

Source: https://open-api.netlify.com/#tag/environmentVariables/operation/createEnvVars

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