如何修復彈出錯誤權限被拒絕:/Users/162408.suryadi/Library/Application Support/Lens/node_module/lenscloud-lens-extension
日志:
50 silly saveTree -- [email protected]
50 silly saveTree -- [email protected]
50 silly saveTree `-- [email protected]
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
uj5u.com熱心網友回復:
在您的日志中,您可以找到問題的描述:
您可能沒有作為當前用戶訪問此檔案的權限。
還有一件事要檢查:
如果您認為這可能是權限問題,請仔細檢查檔案及其包含目錄的權限,或嘗試以 root/管理員身份再次運行該命令。
您遇到的錯誤是因為您無法/Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension從當前用戶訪問資源。如果要修復它,您必須更改此資源的權限或更改其所有者。也有可能(因為您使用的是 Kubernetes)您必須對正在使用的系統的映像進行這樣的更改。
更改所有者運行資源
sudo chown -R $USER /Users/162408.suryadi/Library/Application Support/Lens/node_modules/lenscloud-lens-extension
您還可以找到許多類似的問題。在大多數情況下,唯一的區別是資源的不同路徑。操作方式和問題的解決方法保持不變:
- 錯誤:EACCES:權限被拒絕,訪問“/usr/local/lib/node_modules”
- npm WARN checkPermissions 缺少對 /usr/local/lib/node_modules 的寫訪問權限
- https://progressivecoder.com/how-to-easily-fix-missing-write-access-error-npm-install/
- https://flaviocopes.com/npm-fix-missing-write-access-error/
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/330744.html
標籤:Kubernetes 新产品经理
下一篇:NPM安裝錯誤
