首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >修正错误权限被拒绝"/Users/name/Library/Application Support/Lens/node_modules/lenscloud-lens-extension“而打开镜头应用程序

修正错误权限被拒绝"/Users/name/Library/Application Support/Lens/node_modules/lenscloud-lens-extension“而打开镜头应用程序
EN

Stack Overflow用户
提问于 2021-10-21 02:02:40
回答 1查看 751关注 0票数 1

如何修复弹出错误拒绝许可

日志:

代码语言:javascript
复制
    50 silly saveTree +-- lens-survey@5.2.5-latest.20211001.2
    50 silly saveTree +-- lens-telemetry@5.2.5-latest.20211001.2
    50 silly saveTree `-- lenscloud-lens-extension@5.2.5-latest.20211001.2
    51 warn Lens No description
    52 warn Lens No repository field.
    53 warn Lens No license field.
    54 verbose stack Error: EACCES: permission denied, access '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
    55 verbose cwd /Users/162408.suryadi/Library/Application Support/Lens
    56 verbose Darwin 20.4.0
    57 verbose argv "/Applications/Lens.app/Contents/Frameworks/Lens Helper.app/Contents/MacOS/Lens Helper" "/Applications/Lens.app/Contents/Resources/app.asar/node_modules/npm/bin/npm-cli.js" "install" "--no-audit" "--only=prod" "--prefer-offline" "--no-package-lock"
    58 verbose node v14.16.0
    59 verbose npm  v6.14.13
    60 error code EACCES
    61 error syscall access
    62 error path /Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
    63 error errno -13
    64 error Error: EACCES: permission denied, access '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
    64 error  [Error: EACCES: permission denied, access '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'] {
    64 error   errno: -13,
    64 error   code: 'EACCES',


Could not load extensions: npm WARN checkPermissions Missing write access to /Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
npm WARN enoent ENOENT: no such file or directory, open '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/untitled folder/package.json'
npm WARN Lens No description
npm WARN Lens No repository field.
npm WARN Lens No license field.

npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
npm ERR!  [Error: EACCES: permission denied, access '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/162408.suryadi/.npm/_logs/2021-10-21T02_16_36_016Z-debug.log
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-21 07:06:12

在日志中,您可以找到对问题的描述:

您可能没有以当前用户身份访问此文件的权限。

还有一件事要检查:

如果您认为这可能是权限问题,请再次检查文件及其包含目录的权限,或者尝试以root/Administrator的身份再次运行该命令。

您得到的错误是因为您无法从当前用户访问资源/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension。如果要修复该资源,则必须更改该资源的权限或更改其所有者。也有可能(因为您正在使用Kubernetes),您将不得不对您正在使用的系统的映像进行这样的更改。

更改资源运行的所有者

代码语言:javascript
复制
sudo chown -R $USER /Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension

你也可以找到许多类似的问题。在大多数情况下,唯一的区别将是资源的不同路径。该问题的运作方式和解决办法保持不变:

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69654976

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档