Support for cross-platform technology narn.lock?

I usually run a command npm installon my local machine (OSX) to collect all my node modules in one place so that I can view them, get terminated in my IDE, etc.

However, I am new to using yarn and it seems that in the lockfile some versions of the packages are blocked to be specific to my development environment, so when I yarn my package. json in a container for alpine dockers, he tells me things like

warning fsevents@1.1.2: The platform "linux" is incompatible with this module.

I assume that the package was blocked for a specific version or set of dependencies specific to OSX.

This does not seem to violate any features yet, but I am worried that this might happen along the line. Any ideas on how to support cross-platform development yarn? Or is that what I see here is completely benign?

+4
source share
1 answer

Not really an answer, but ...

Your example is not a problem specific to yarn, yarn.lockor npmand package-lock.json. The package is fseventsdesigned specifically for MacOS file system events. Thus, it will not work on any other platform (for example, Linux).

If you use this package directly, you might consider a replacement that is cross-platform.

- , , ( ) -.

, , . , ( ) , , . package.json , , , ( ).

, , :

, , , ...

https://yarnpkg.com/lang/en/docs/dependency-types/

+2

Source: https://habr.com/ru/post/1680557/


All Articles