【发布时间】: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