New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to install hexo #3268

Open
Lawliet01 opened this Issue Sep 25, 2018 · 3 comments

Comments

4 participants
@Lawliet01

Lawliet01 commented Sep 25, 2018

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 titlecase@1.1.2: no longer maintained
npm WARN deprecated postinstall-build@5.0.3: 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

@ahuigo

This comment has been minimized.

Show comment
Hide comment
@ahuigo

ahuigo Sep 25, 2018

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

ahuigo commented Sep 25, 2018

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
@tcrowe

This comment has been minimized.

Show comment
Hide comment
@tcrowe

tcrowe Sep 25, 2018

Contributor

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

Contributor

tcrowe commented Sep 25, 2018

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

@RichardJECooke

This comment has been minimized.

Show comment
Hide comment
@RichardJECooke

RichardJECooke Sep 25, 2018

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

RichardJECooke commented Sep 25, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment