Answer the question
In order to leave comments, you need to log in
The package-lock.json file: to be or not to be?
The purpose of this file is very clear - to fix the versions of packages used so that an exact copy of node_modules can be deployed.
And I, as expected, save this file in a turnip, along with the source code.
But this is not the first time I step on a rake.
Opened an old project today. It is not very old, three months have passed since the last edit, and I ruled on my wheelbarrow. I clone, that means, the code from the turnip, I run npm install, everything starts up, downloads, builds, rebuilds sass, as a result, everything goes in normal mode, without errors.
I start the dev server npm start, I get an error and a crash from the task (alas, I don’t remember which one). Just in case, I erase node_modules, repeat everything and again the error.
OK. I delete node_modules, delete package-lock.json, install it, run it - everything works.
Does anyone know the reason for this behaviour?
Do you keep the lock file in the turnip yourself?
Answer the question
In order to leave comments, you need to log in
Does anyone know the reason for this behaviour?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question