我正在尝试在 node.js 中迈出第一步,我一直在学习本教程:
https ://docs.microsoft.com/en-us/azure/app-service-api/app-service-api- nodejs-api-app
当我npm install -g yo
在 azure 中键入云外壳时,我收到此错误:
npm ERR! Linux 4.4.0-83-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/shiran_dror/app-service-api-node-contact-list/npm-debug.log
如何以 root/管理员身份使用 shell?