【问题标题】:Yarn using error: how to use yarn on git bash纱线使用错误:如何在 git bash 上使用纱线
【发布时间】:2017-03-30 06:31:07
【问题描述】:

通过 npm 安装纱线依赖管理后,我得到了 cmd 版本 0.21.3 的成功信息。 当我打开 git bash 以使用 yarn 命令时,出现以下错误:

  module.js:471
    throw err;
    ^
Error: Cannot find module 'D:\c\Program Files (x86)\Yarn\bin\yarn.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

【问题讨论】:

    标签: node.js bash yarnpkg


    【解决方案1】:

    尝试使用npm link 命令创建指向yarn 模块的符号链接。您可以使用以下命令。

    npm link yarn
    

    然后尝试在你的 git bash 中执行 yarn 命令。

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 2022-06-20
      • 2022-01-19
      • 2021-11-09
      • 2019-08-03
      • 2017-05-26
      • 2020-11-25
      • 2020-10-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多