I tried to install hexo through terminal by execute the coommand "npm install hexo -g" but I failed.
This is what the error said:
npm WARN deprecated [email protected]: no longer maintained
npm WARN deprecated [email protected]: postinstall-build's behavior is now built into npm! You should migrate off of postinstall-build and use the new prepare lifecycle script with npm 5.0.0 or greater.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
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! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
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/wuzhiyu/.npm/_logs/2018-09-25T09_37_28_040Z-debug.log
Permission problem.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
Use sudo or proper user who has write permission of /usr/local/lib/node_modules to install it.
npm install hexo -g
Perhaps to install globally you need sudo npm install hexo-cli@latest --global
Alternatively you can run nvm, node, and npm for each user. https://github.com/creationix/nvm
If it is a permission problem you don't need to install globally (in fact, I think this is bad practice).
You can just run npm install hexo then call it like ./node_modules/.bin/hexo init
for me this message appears! npm WARN deprecated [email protected]: no longer maintained
resolved: I typed the command
resolvido : digitei o comando cd folder dir
bash: cd: too many arguments
cleverTon@LAPTOP-~/folder
$ dir
_config.yml node_modules package.json scaffolds source themes yarn.lock
cleverTon MINGW64 ~/folder
$ dir
_config.yml node_modules package.json scaffolds source themes yarn.lock
cleverTon@...........
$ npm install
npm WARN deprecated [email protected]: no longer maintained
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 105 packages from 46 contributors, removed 39 packages, updated 316 packages and audited 4699 packages in 60.911s
found 0 vulnerabilities
cleverTon@LAPTOP-xxxxxxxxxxxx~/folder
$ hexo server
INFO Start processing
INFO Hexo is running at http://localhost:xxxxxxx . Press Ctrl+C to stop.
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.