1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/errors/env-key-not-allowed.md
Connor Davis 1e5d0908d0 Block Certain Env Keys That Are Used Internally (#6260)
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.
2019-02-15 17:49:40 +01:00

10 lines
377 B
Markdown

# The key "<your key>" under "env" in next.config.js is not allowed.
#### Why This Error Occurred
Next.js configures internal variables for replacement itself. These start with `__` or `NODE_`, for this reason they are not allowed as values for `env` in `next.config.js`
#### Possible Ways to Fix It
Rename the specified key so that it does not start with `__` or `NODE_`.