serverless: oh oh Error: EACCES: permission denied, open '/usr/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.bash'

This is a Bug Report

Description

Updating Serverless under the Windows Subsystem for Linux I am getting the following output that includes an error message:

$sudo npm install -g serverless
/usr/bin/serverless -> /usr/lib/node_modules/serverless/bin/serverless
/usr/bin/sls -> /usr/lib/node_modules/serverless/bin/serverless
/usr/bin/slss -> /usr/lib/node_modules/serverless/bin/serverless

> serverless@1.25.0 postinstall /usr/lib/node_modules/serverless
> node ./scripts/postinstall.js

oh oh Error: EACCES: permission denied, open '/usr/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.bash'
Could not auto-install serverless autocomplete script.
Please copy / paste the script above into your shell.

┌─────────────────────────────────────────────────────────┐
│             serverless update check failed              │
│           Try running with sudo or get access           │
│          to the local update config store via           │
│ sudo chown -R $USER:$(id -gn $USER) /home/nickw/.config │
└─────────────────────────────────────────────────────────┘
+ serverless@1.25.0
updated 1 package in 18.653s

Running sudo chown -R $USER:$(id -gn $USER) /home/nickw/.config and repeating the sudo npm install -g serverless does not fix the problem.

For bug reports:

  • oh oh Error: EACCES: permission denied, open ‘/usr/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.bash’

  • Serverless Framework Version you’re using: 1.25.0

  • Operating System: Ubuntu 16.04 LTS under the Windows Subsystem for Linux (WSL)

  • Stack Trace:

  • Provider Error messages: oh oh Error: EACCES: permission denied, open ‘/usr/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.bash’

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 2
  • Comments: 18

Most upvoted comments

Shall we stop editing people’s shell configurations without explicitly asking for it?

https://github.com/serverless/serverless/issues/4069

User this:

sudo npm install -g --unsafe-perm=true --allow-root serverless

having the error again

Error: EACCES: permission denied, open '/usr/lib/node_modules/serverless/node_modules/storage-engine/lib/compatibility/index.js'