reactioncommerce / reaction-cli

A command line tool for working with Reaction Commerce.
33 stars 20 forks source link

Can't install CLI on Ubuntu using npm or yarn #52

Closed brent-hoover closed 6 years ago

brent-hoover commented 6 years ago

A couple of people have reported this and now I have replicated it. If you install NodeJs via a package manager (like these instructions here)

You get this error:

brent@badger ~/Projects/js $ npm install -g reaction-cli
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/brent/.npm/_logs/2017-12-07T06_23_29_026Z-debug.log
brent@badger ~/Projects/js $ 

This is probably what happens when you sudo apt-get node and then try to install the CLI.

If installed via yarn it just says that the application can't be found.

This could just be something where we need to be more specific in the install instructions? Installing any global package after installing with sudo (like npm install -g yo) also fails.

brent-hoover commented 6 years ago

Closing. Updating installation instructions to include fixing permissions after installing via package manager.