This is my understanding of how yarn
nodejs package management works
yarn.lock
declares the exact version of packages installed on your project. This list of package is independent of OS. yarn.lock
file include:
package.json
file -> Current OS doesn't affect what package is put inside yarn.lock
when you run yarn install
What I did:
yarn install
on Ubuntu 14.04 -> generates yarn.lock
yarn.lock
onto a Mac machine nodejs
version as the one on Ubuntu 14.04, run yarn install --frozen-lockfile
And the the installation fails. But when I use a different version of nodejs
on Mac, running yarn install --frozen-lockfile
works.
So does this mean with:
yarn.lock
file nodejs
one CAN'T GUARANTEED the installation would work across all OS?
yarn.lock
it won't work 100% on other platforms until unless all dependencies support cross platforms
Just checked my yarn.lock
they add some dependencies based on an operating system in my case it was is-windows
module added
Check all your packages are supported for cross platforms because sometimes many packages are platform specific, You can check all dependencies on packages.json of that package
OR
Do not push yarn.lock
if you use the application on different operating systems.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.