Frequently Asked Questions
This is a list of frequently asked questions related to local development with Now.
All of the questions feature full answers and many contain links to other resources you may find helpful.
Questions can be found under their relevant section header.
now dev when developing a Next.js app? Why not just run
When you are developing a Next.js application for Now 2.0, the main objective with
now dev is to imitate our cloud environment.
With that in mind, a few additional steps are necessary before your application can be served in a Serverless environment, including the execution of Builders to optimize your code, proper handling of routes defined in your
now.json and the loading of environment variables.
now dev is a single command development experience.
Which Builders are supported in
The following Builders are currently supported for use within
The following Builders are not yet supported but are being worked on and should be available soon:
now dev work with builders that are not in the official list?
While we strongly recommend using our Official Builders, other Builders should work too.
The Official Builders contain optimizations and features specifically aligned with the current release of
now dev. If your specific use-case isn't working out, please don't hesitate to reach out to us on our community chat — we'll try our best to help.
How do I upgrade to
We always recommend running the latest version of the Now CLI. This lets you take advantage of the newest features, stability and security enhancements. To download the Now CLI, visit our download page. To upgrade the Now CLI, follow the instructions in the Upgrade section.
I've used Now 1.0 in the past, how do I start using
We encourage you to upgrade to Now 2.0 in order to take advantage of
now dev. Upgrading also allows you to enjoy new features, better performance and security, and lower pricing.
Once complete, you can start refactoring your
now.json. In Now 2.0 we've introduced 2 new configurations:
builds: This is responsible to translate your code into one or more lambdas or static assets. The documentation can be accessed here.
routes: By default, the filesystem is used as a router. You can manipulate that behavior with this configuration. The documentation can be accessed here.
A look at our examples is also recommended, since it is very likely that you can borrow a
now.json and deploy your app quicker.
Why am I seeing an environment variables are not defined in
.env error when using secrets?
Why I can’t use
.env.build when deploying?
Your application's security is of paramount importance to us. An unencrypted
.env file exposes you to a security risk — therefore we do not allow it. Use the secrets feature to protect your information by storing your variables safely in the cloud.
How do I detect local development or cloud deployment?
Sometimes you need to execute a different code path when your application is running locally compared to when it is running remotely in the cloud. All deployments expose a
NOW_REGION environment variable which is assigned to the region where the Lambda is currently executing. This value is
dev1 for local development.
now dev work for all types of projects?
now dev work offline for me?
now dev needs to be able to download your project's dependencies before it can continue. If you aren't able to use
now dev offline, most likely your dependencies haven't been downloaded yet — getting online and running
now dev again should fix it.
Something isn’t right with
now dev – who do I reach out to?
Extend your projects with all that Now offers: