promote:~ wangke$ npm install -g hexo-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/arr-diff
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/array-unique
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/binary-extensions
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/bluebird
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/component-emitter
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/concat-map
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/brace-expansion
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/copy-descriptor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/core-util-is
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/decode-uri-component
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/define-property/node_modules/is-descriptor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/define-property
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/escape-string-regexp
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/filename-regex
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/for-in
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/for-own
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/get-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/graceful-fs
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/has-ansi
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/has-value/node_modules/isobject
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/highlight.js
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/html-entities
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/inherits
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-accessor-descriptor/node_modules/kind-of
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-binary-path
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-buffer
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/has-values
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/has-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-data-descriptor/node_modules/kind-of
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-dotfile
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-extendable
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-extglob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/extglob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-glob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/glob-parent
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/glob-base
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-plain-object
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/extend-shallow
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-posix-bracket
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/expand-brackets
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-primitive
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-equal-shallow
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-windows
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/isarray
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/isexe
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/isobject
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/kind-of
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-accessor-descriptor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-data-descriptor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-descriptor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-number
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/lower-case
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/map-cache
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/fragment-cache
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/math-random
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch/node_modules/arr-diff
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch/node_modules/braces
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch/node_modules/extglob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch/node_modules/kind-of
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/minimatch
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/mixin-deep
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/mkdirp
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/moment
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/ms
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/debug
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/nan
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/ncp
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/no-case
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/object-copy
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/object-visit
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/map-visit
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/collection-visit
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/object.omit
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/object.pick
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/os-homedir
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/parse-glob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/pascalcase
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/path-is-absolute
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/path-parse
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/posix-character-classes
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/preserve
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/process-nextick-args
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/pseudomap
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/randomatic
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/regex-cache
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/remove-trailing-separator
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/normalize-path
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/repeat-element
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/repeat-string
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/fill-range
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/expand-range
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/braces
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/anymatch
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/resolve-url
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/ret
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/safe-buffer
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/safe-json-stringify
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/safe-regex
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/regex-not
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/snapdragon-util
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/snapdragon-node
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/source-map
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/source-map-url
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/split-string
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/set-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/static-extend
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/class-utils
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/string_decoder
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/strip-ansi
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/striptags
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/supports-color
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/chalk
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/to-object-path
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/to-regex
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/to-regex-range
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/union-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/unset-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/cache-base
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/base
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/upper-case
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/camel-case
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/urix
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/source-map-resolve
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/use
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/snapdragon
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/nanomatch
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/util-deprecate
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/readable-stream
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/readdirp
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/chokidar
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/which
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/wrappy
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/once
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/inflight
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/glob
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/rimraf
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/mv
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-bunyan
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/yallist
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/lru-cache
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/cross-spawn
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_extend-shallow@3.0.2@extend-shallow
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_fill-range@4.0.0@fill-range
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_is-descriptor@1.0.2@is-descriptor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_is-number@2.1.0@is-number
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_set-value@0.4.3@set-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/abbrev
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/braces/node_modules/repeat-element
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/command-exists
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_has-value@0.3.1@has-value/node_modules/get-value
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_has-value@0.3.1@has-value/node_modules/has-values
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-fs
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-util
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch/node_modules/array-unique
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/minimist
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/object-assign
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/resolve
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/tildify
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/define-property/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/has-value/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-accessor-descriptor/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/has-values/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-data-descriptor/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/is-descriptor/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/extend-shallow/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/micromatch/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/set-value/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/braces/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo-cli/node_modules/_has-value@0.3.1@has-value/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules/hexo-cli/node_modules/arr-diff
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/hexo-cli/node_modules/arr-diff'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/hexo-cli/node_modules/arr-diff']
npm ERR! stack:
npm ERR! "Error: EACCES: permission denied, access '/usr/local/lib/node_modules/hexo-cli/node_modules/arr-diff'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/hexo-cli/node_modules/arr-diff' }
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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wangke/.npm/_logs/2018-11-05T10_39_14_153Z-debug.log
promote:~ wangke$
根据错误提示是权限问题,建议以 root/Administrator身份执行操作。
sudo chown -R $USER /usr/local
再重新执行一次npm install hexo -g
试试