Cannot install in El Capitan

I’ve been working on this for a while and it’s the simplest thing….I NEED to simply install express so I can move on and actually work. No matter what I do I get this same error and express won’t install:
`➜ ~ npm install -g express
npm WARN checkPermissions Missing write access to /Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express
└── express@4.14.0

npm ERR! Darwin 15.6.0
npm ERR! argv “node” “/Users/revjtanton/.nvm/versions/node/v0.12.2/bin/npm” “install” “-g” “express”
npm ERR! node v0.12.2
npm ERR! npm v3.9.3
npm ERR! path /Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, access ‘/Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, access ‘/Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! path: ‘/Users/revjtanton/.nvm/versions/node/v0.12.2/lib/node_modules/express’ }
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/revjtanton/npm-debug.log`

I’ve managed permissions, cleaned caches, tried installing with sudo (which doesn’t produce an error…but I’m still not able to use express).

Author: Fantashit

1 thought on “Cannot install in El Capitan

  1. try sudo chown -R $(whoami) /Users/revjtanton/.nvm. It is clearly a permissions problem.

    FWIW, I am not sure why you would ever want to install express globally, so I would also caution you to drop the -g and install it in the project in which you are using it, which would also avoid this issue.

Comments are closed.