This post contains content about Now 1.0 – Learn about the latest version, Now 2.0.
Now 2.0 - Upgrade Available
Our semver-aware cloud cache can speed up version resolution and download of packages dramatically. What's more, when a
npm-shrinkwrap.json are present, we get to faithfully and nearly instantly reproduce your development conditions.
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
.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.
If you are using private modules, they will work seamlessly with npm5 and Now.
package.json uses scoped private modules, like
@org/my-private-module, you can run:
To avoid typing
--forward-npm every time, set
"forwardNpm": true in
… and we'll be able to fetch your dependencies and deploy them with your project!
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!