package-lock.json and adding dependencies to itowns

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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
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
[hidden email]


[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



_______________________________________________
iTowns-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/itowns-dev

signature.asc (836 bytes) Download Attachment
Loading...