【问题标题】:How can I upgrade yarn on Azure Web Service and make yarn workspaces work如何在 Azure Web 服务上升级 yarn 并使 yarn 工作区正常工作
【发布时间】:2019-08-02 16:33:04
【问题描述】:

我无法让 yarn 工作区在 Azure Web 服务上运行,也无法升级 yarn。

我有一个部署为 Azure Web 服务的应用程序。它使用纱线工作区。不幸的是,在yarn install 期间发生了错误

[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/site/wwwroot/node_modules/@gsx/common'".
info If you think this is a bug, please open a bug report with the information provided in "/home/site/wwwroot/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

我读到升级 yarn 可以解决问题。 Azure 默认自带 yarn 1.6.0。

我的存储库中有deploy.sh 文件,因此我可以自定义部署过程。我想添加命令来升级纱线。

我尝试通过两种方式实现它:

npm install -g yarn

sudo npm install -g yarn

他们都失败了。在第一种情况下,我收到一条消息,说我没有足够的权限。在第二个日志中说没有命令sudo

你有什么想法,我该如何升级yarn?

【问题讨论】:

    标签: node.js azure yarnpkg azure-web-app-service yarn-workspaces


    【解决方案1】:

    请查看this repo 并尝试一下。您所要做的就是将上述存储库中的deploy.cmd.deployment 文件复制到您的,这将使Kudu 使用此脚本而不是默认脚本。希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-21
      • 2021-06-25
      • 2019-11-10
      • 1970-01-01
      • 2020-02-15
      • 2022-08-02
      • 2016-09-02
      相关资源
      最近更新 更多