簡體   English   中英

安裝帶有 EACCES 符號鏈接錯誤的 expo-cli

[英]Installing expo-cli with EACCES symlink error

我正在嘗試使用npm install -g expo-cli ,但是遇到了這個問題。 我看過其他帖子,他們有類似的問題,但系統調用似乎不同。 他們推薦的任何解決方案似乎都不起作用。 我相信這與 npm 的安裝方式有關,但不確定如何繼續。 運行npm list -g返回以下內容:

    /usr/local/lib
└─┬ npm@6.14.5

那不應該在/usr/local/lib/node下嗎?

我得到的錯誤如下:

npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /usr/local/bin/expo
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'
npm ERR!  [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'] {
npm ERR!   cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/usr/local/bin/expo'] {
npm ERR!     errno: -13,
npm ERR!     code: 'EACCES',
npm ERR!     syscall: 'symlink',
npm ERR!     path: '../lib/node_modules/expo-cli/bin/expo.js',
npm ERR!     dest: '/usr/local/bin/expo'
npm ERR!   },
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/expo-cli/bin/expo.js',
npm ERR!   dest: '/usr/local/bin/expo'
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/my_user_name/.npm/_logs/2020-07-07T22_13_27_629Z-debug.log

試試這個 - sudo npm install --unsafe-perm -g expo-cli它對我有用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM