【发布时间】:2021-07-14 22:37:32
【问题描述】:
大家晚上好! 我正在尝试使用 npm 在我的 linux mint 上安装 vue.js。 当我运行 vue 教程中给出的简单命令时:
npm install -g @vue/cli
经过一些警告后,终端中出现以下错误:
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib' }
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! and path to error log here
我明白,“操作被我的操作系统拒绝” 但我不知道如何解决它。如果有人帮我解决这个问题,我将不胜感激,因为我认为问题很简单
【问题讨论】:
标签: vue.js npm linux-mint