lerna ERR! yarn install --mutex network:42424 --non-interactive

yarn install --mutex network:42424 --non-interactive

lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'selenium-ide-extension'

Probably the reason is in https://github.com/lerna/lerna/blob/master/src/NpmUtilities.js#L66.

I assume that lerna is running more than one node_modules installation in parallel.

Yarn may fail if it runs yarn install in multiple processes because they may be reading/writing to common cache folder.
A way around is to run yarn with --mutex network option.
But be mindful to run with a non default port otherwise top level Yarn with --mutex network will never allow this script to start.

Sounds like --mutex network:<nonDefaultPort> (docs) is the ticket.

Concurrency

and --mutex

When running multiple instances of yarn as the same user on the same server, you can ensure only one instance runs at any given time (and avoid conflicts) by passing the global flag --mutexfollowed by file or network.

When using file Yarn will write/read a mutex file .yarn-single-instance in the current working directory by default. You can also specify an alternate or global filename.

--mutex file
--mutex file:/tmp/.yarn-mutex

When using network Yarn will create a server at port 31997 by default. You can also specify an alternate port.

--mutex network
--mutex network:30330

Verbose output

with --verbose

Running yarn <command> --verbose will print verbose info for the execution (creating directories, copying files, HTTP requests, etc.).

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容