[iTowns-dev] package-lock.json and adding dependencies to itowns

Augustin Trancart augustin.trancart at oslandia.com
Thu Jul 27 01:11:18 PDT 2017


Hi everyone,

Just so that everyone knows, since npm 5 (I think), npm generates a
package-lock.json file when we do `npm install`[1]. This file is intented to be
committed.

Therefore, when adding a dependency to itowns, we need to execute `npm install`
using npm v5 before committing. As a reminder, usually node 6 comes with npm3,
node8 with npm5.

If you don't want to upgrade for some reason, one possible solution to deal with
multiple node version is to use nvm [2] (That's what I happily use so far) or
nvm-windows [3]. It allows you to switch between node/npm version in a shell
among other things.

Cheers,

-- 
Augustin Trancart - Oslandia
augustin.trancart at oslandia.com


[1] more info on package-lock.json https://docs.npmjs.com/files/package-lock.json
[2] https://github.com/creationix/nvm (linux and mac only)
[3] https://github.com/coreybutler/nvm-windows


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/itowns-dev/attachments/20170727/31f12d9f/attachment.sig>


More information about the iTowns-dev mailing list