Npm install express-generator -g reported the following error, please help to look at it

  node.js, question

npm ERR! tar.unpack untar error /Users/mac/.npm/express-generator/4.13.1/package.tgz
npm ERR! Darwin 15.2.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “express-generator” “-g”
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! path /usr/local/lib/node_modules/express-generator
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/express-generator’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/express-generator’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘/usr/local/lib/node_modules/express-generator’,
npm ERR! fstream_type: ‘Directory’,
npm ERR! fstream_path: ‘/usr/local/lib/node_modules/express-generator’,
npm ERR! fstream_class: ‘DirWriter’,
npm ERR! fstream_stack:
npm ERR! [ ‘/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25’,
npm ERR! ‘/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53’,
npm ERR! ‘FSReqWrap.oncomplete (fs.js:82:15)’ ] }
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! /Users/mac/Desktop/myapp/npm-debug.log

You really didn’t add beforesudoAh, like this:

sudo npm install express-generator -g

Error key:EACCES,permission denied