This post contains content about Now 1.0 – Learn about the latest version, Now 2.0.
Now 2.0 - Upgrade Available

A few months ago we announced we were making JavaScript module installation up to 32.7x faster.

Our semver-aware cloud cache can speed up version resolution and download of packages dramatically. What's more, when a yarn.lock or npm-shrinkwrap.json are present, we get to faithfully and nearly instantly reproduce your development conditions.

With the release of npm5 comes a new lockfile: package-lock.json. Today, we are excited to announce its support for all now deployments.


How It Works

First, make sure to upgrade to npm5. It conveniently ships with the also newly released Node.js 8, support for which we are also introducing today.

Every time you run npm i with npm5, a package-lock.json file will be generated.

It's worth noting that you should not ignore that file from source control. If the file is not in .gitignore or.npmignore, it will be picked up by now.

When you run now, the output from your deployment will look like this:

▲  front now
> Deploying ~/Projects/front under zeit
> Using Node.js 7.10.0 (default)
> Ready! https://front-igmlqgviin.now.sh (copied to clipboard) [4s]
> Synced 4 files (219.46kB) [2s]
> Initializing…
> Building
> ▲ npm install
> ✓ Using "package-lock.json"
> ⧗ Installing 59 main dependencies…
> ▲ npm install
> ✓ Installed 887 modules [11s]

Output from deploying zeit.co while writing this very blog post

And that's it! You get to retain your normal npm workflow and your deployments will just work, no configuration needed.


Private Modules

If you are using private modules, they will work seamlessly with npm5 and now.

If your package.json uses scoped private modules, like @org/my-private-module, you can run:

now --forward-npm

To avoid typing --forward-npm every time, set "forwardNpm": true in ~/.now.json

… and we'll be able to fetch your dependencies and deploy them with your project!


Future Work

We look forward to continuing our work with the JavaScript community on the most versatile, production-ready and scalable deployment solution.

We are happy to see package managers move in the direction of great reliability and reproducibility. npm5 is raising that bar even further, and we congratulate the team on this amazing release!