简体   繁体   English

我正在尝试使用npm在终端中使用以下命令来更新我的魔镜:npm install -g npm

[英]I'm trying to update my magic mirror using npm, using the following command in terminal: npm install -g npm

pi@raspberrypi:~ $ npm install -g npm npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm npm WARN checkPermissions Missing write access to /usr/lib/node_modules npm ERR! pi @ raspberrypi:〜$ npm install -g npm npm WARN checkPermissions缺少对/ usr / lib / node_modules / npm npm WARN的写入权限缺少对/ usr / lib / node_modules npm的写入权限ERR! path /usr/lib/node_modules/npm npm ERR! 路径/ usr / lib / node_modules / npm npm错误! code EACCES npm ERR! 代码EACCES npm ERR! errno -13 npm ERR! errno -13 npm错误! syscall access npm ERR! syscall访问npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/npm' npm ERR! 错误:EACCES:权限被拒绝,访问'/ usr / lib / node_modules / npm'npm ERR! { [Error: EACCES: permission denied, access '/usr/lib/node_modules/npm'] npm ERR! {[错误:EACCES:权限被拒绝,访问'/ usr / lib / node_modules / npm'] npm错误! stack: npm ERR! 堆栈:npm ERR! 'Error: EACCES: permission denied, access \\'/usr/lib/node_modules/npm\\'', npm ERR! '错误:EACCES:权限被拒绝,访问\\'/ usr / lib / node_modules / npm \\'',npm ERR! errno: -13, npm ERR! errno:-13,npm错误! code: 'EACCES', npm ERR! 代码:“ EACCES”,npm错误! syscall: 'access', npm ERR! syscall:“访问”,npm错误! path: '/usr/lib/node_modules/npm' } npm ERR! 路径:'/ usr / lib / node_modules / npm'} npm ERR! npm ERR! npm ERR! The operation was rejected by your operating system. 该操作被您的操作系统拒绝。 npm ERR! npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! 您可能没有权限以当前用户npm ERR的身份访问此文件! npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! 如果您认为这可能是权限问题,请仔细检查npm ERR! permissions of the file and its containing directories, or try running npm ERR! 文件及其包含目录的权限,或尝试运行npm ERR! the command again as root/Administrator (though this is not recommended). 再次以root / Administrator身份执行命令(尽管不建议这样做)。

npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! 可以在以下位置找到该运行的完整日志:npm ERR! /home/pi/.npm/_logs/2019-01-13T02_13_34_227Z-debug.log pi@raspberrypi:~ $ /home/pi/.npm/_logs/2019-01-13T02_13_34_227Z-debug.log pi @ raspberrypi:〜$

sudo npm install -g npm

Sudo is the key here. 须藤是这里的关键。 May the force be with you. 愿原力与你同在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM