Azure App服务安装错误:EACCES:拒绝许可,mkdir'/opt/kudu/local/npm-cache'
我正在尝试同步与Bitbucket链接的应用程序服务。当我尝试从bitbucket同步数据时,它向我显示以下错误 信息访问 https://yarnpkg.com/en/docs/docs/cli/install 有关此命令的文档。 错误/TMP/8DA38DCB36CF63A/NODE_MODULES/SHARP:命令失败。 退出代码:1 命令:( node install/libvips&& amp; amp; amp install/dll-copy& amp; amp; amp; amp; amp; amp; amp; (节点安装/can-compile& amp; amp; node-gyp rebuild& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; 参数: 目录:/TMP/8DA38DCB36CF63A/NODE_MODULES/SHARP 输出: 夏普:安装错误:EACCES:允许拒绝,mkdir'/opt/kudu/local/npm-cache' 夏普:您是要作为根或sudo用户安装吗?再试一次 - unsafe-perm标志 夏普:请参阅 https://sharp.pixelplumping.com/install 警告“ @strapi/plugin-users-permissions> @strapi/helper-plugin 有人可以帮我吗? 解决方案是什么
I am trying to sync the app service which is linked with the bitbucket. when i try to sync data from the bitbucket its showing me below error
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /tmp/8da38dcb36cf63a/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /tmp/8da38dcb36cf63a/node_modules/sharp
Output:
sharp: Installation error: EACCES: permission denied, mkdir '/opt/Kudu/local/npm-cache'
sharp: Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flag
sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
warning "@strapi/plugin-users-permissions > @strapi/helper-plugin
anyone can help me ?
what's the solution
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于它在NPM-CACHE文件夹上进行
npm install
,但没有权利。我通过在Azure
pre_build_command
上创建一个新的“应用程序设置”解决了它:mkdir ./npmcache&&&& NPM配置设置缓存./npmcache
。在纱线/NPM安装 +构建之前执行此命令。它创建一个新文件夹,上面有写入权。然后将此文件夹设置为NPM缓存文件夹。
The problem is it does
npm install
on the npm-cache folder, but it does not have rights to do so.I resolved it with creating a new "Application Setting" on Azure
PRE_BUILD_COMMAND
with value:mkdir ./npmcache && npm config set cache ./npmcache
.This command is executed before the yarn/npm install + build. It create a new folder, having write rights on it. Then it set this folder as the npm cache folder.