package-lock.json and adding dependencies to itowns

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

package-lock.json and adding dependencies to itowns

Augustin Trancart
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

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.


Augustin Trancart - Oslandia
[hidden email]

[1] more info on package-lock.json
[2] (linux and mac only)

iTowns-dev mailing list
[hidden email]

signature.asc (836 bytes) Download Attachment