Files
vercel/errors/missing-env-file.md
Steven 6b52cfdbc7 [now-cli][now-client] Add support for vercel config files (#4234)
This PR renames the CLI and config files to `vercel`.

https://vercel.com/blog/zeit-is-now-vercel

### Complete
- [x] Help menus and error messages should print cli name from `package.json`
- [x] `now.json` => `vercel.json`
- [x] `.nowignore` => `.vercelignore`
- [x] `~/.now` => `~/.vercel`
- [x] `<project>/.now/project.json` => `<project>/.vercel/project.json`

### TODO
I'm going to do the remaining work in a follow-up PR:
- [ ] `<project>/.now/cache` => `<project>/.vercel/cache` (Runtimes sometimes use this)
- [ ] `NOW_*` special cased environment variables
- [ ] `*.now.sh` special cased url suffix
2020-05-05 14:58:05 -04:00

1.5 KiB

Missing Environment Variables While Developing

Why This Error Occurred

You ran now dev inside a project that contains a vercel.json file with env or build.env properties that use Now Secrets.

In order to use environment variables in your project locally that have values defined using the Now Secrets format (e.g. @my-secret-value), you will need to provide the value as an environment variable using a .env or .env.build file.

We require this to ensure your app works as you intend it to, in the Now Dev environment, and to provide you with a way to mirror or separate private environment variables within your applications, for example when connecting to a database.

Read below for how to address this error.

Possible Ways to Fix It

The error message will list environment variables that are required and which file they are required to be included in (either .env or .env.build).

If the file does not exist yet, please create the file that the error message mentions and insert the missing environment variable into it.

For example, if the error message shows that the environment variable TEST is missing from .env, then the .env file should look like this:

TEST=value

In the above example, TEST represents the name of the environment variable and value its value.

For more information on Environment Variables in development, see the documentation.