【问题标题】:terminal defaults to old yarn version (lerna bootstrap)终端默认为旧的纱线版本(lerna bootstrap)
【发布时间】:2020-10-21 03:14:59
【问题描述】:

我不认为这是 lerna 特有的问题,我实际上认为它与 nvm 相关(尽管我从我的 .bash_profile 中注释掉了 nvm 来测试它,但没有成功)。

我正在尝试lerna bootstrap,但它一直在使用(并且失败)比我正在运行的更旧版本(1.3.2)的纱线:

$ yarn -v
1.22.4

$ lerna bootstrap
info cli using local version of lerna
lerna notice cli v3.22.1
lerna info versioning independent
lerna info bootstrap root only
yarn install v1.3.2
error An unexpected error occurred: "patterns.map is not a function".
info If you think this is a bug, please open a bug report with the information provided in "yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'root'
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'root'

$ yarn -v
1.22.4

【问题讨论】:

    标签: yarnpkg lerna


    【解决方案1】:

    升级纱线。我使用 brew,所以我使用了brew install yarn,它成功了。

    【讨论】:

      【解决方案2】:

      对我来说,这发生在Ubuntu 20.04,通过卸载 cmdtest 解决了:

      sudo apt-get purge cmdtest
      

      【讨论】:

        【解决方案3】:

        我扎根于我的文件系统并删除了~/.yarn~/node_modules/yarn,现在一切正常。

        【讨论】:

          猜你喜欢
          • 2018-09-16
          • 1970-01-01
          • 1970-01-01
          • 2020-02-24
          • 2021-02-16
          • 1970-01-01
          • 2021-09-05
          • 2021-07-16
          • 1970-01-01
          相关资源
          最近更新 更多