Skip to content

Throw when NODE_ENV is added to env in next.config.js #6244

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

Closed
timneutkens opened this issue Feb 11, 2019 · 0 comments · Fixed by #6260
Closed

Throw when NODE_ENV is added to env in next.config.js #6244

timneutkens opened this issue Feb 11, 2019 · 0 comments · Fixed by #6260
Assignees

Comments

@timneutkens
Copy link
Member

Feature request

I just realized we override NODE_ENV but don't disallow setting it in env, which can cause confusing results.

module.exports = {
  env: {
    NODE_ENV: 'something'
  }
}

This should throw.

timneutkens pushed a commit that referenced this issue Feb 15, 2019
Closes: #6244 

This will block the following keys:
```
NODE_.+
__.+
```

There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
@lock lock bot locked as resolved and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants