Unable to install serverless

for some reason ( not sure what happened) but I am unable to install the serverless framework. This is what I got

npm WARN deprecated superagent@3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header).  This notice will go away with v5.0.2+ once it is released.
/usr/local/bin/serverless -> /usr/local/lib/node_modules/serverless/bin/serverless.js
/usr/local/bin/slss -> /usr/local/lib/node_modules/serverless/bin/serverless.js
/usr/local/bin/sls -> /usr/local/lib/node_modules/serverless/bin/serverless.js

> spawn-sync@1.0.15 postinstall /usr/local/lib/node_modules/serverless/node_modules/spawn-sync
> node postinstall

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
    cachedCwd = binding.cwd();

Error: EACCES: permission denied, uv_cwd
    at process.cwd (internal/process/main_thread_only.js:42:25)
    at Object.resolve (path.js:979:47)
    at patchProcessObject (internal/bootstrap/pre_execution.js:83:28)
    at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:11:3)
    at internal/main/run_main_module.js:7:1 {
  errno: -13,
  code: 'EACCES',
  syscall: 'uv_cwd'
npm ERR! errno 1
npm ERR! spawn-sync@1.0.15 postinstall: `node postinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the spawn-sync@1.0.15 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

I was able to do this before so I don’t know what I did wrong.


It sounds like some sort of permission error? I would post this over on the Serverless Framework issues page.