前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >lerna ERR! yarn install --mutex network:42424 --non-interactive

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

作者头像
一个会写诗的程序员
发布2018-12-25 11:48:18
6.9K0
发布2018-12-25 11:48:18
举报

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.

代码语言:javascript
复制
--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.

代码语言:javascript
复制
--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.).

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018.12.11 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Concurrency
  • Verbose output
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档