Skip to content
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

npm installation of mbt issue #609

Closed
DanieleStrafile opened this issue Nov 28, 2019 · 4 comments
Closed

npm installation of mbt issue #609

DanieleStrafile opened this issue Nov 28, 2019 · 4 comments

Comments

@DanieleStrafile
Copy link

Please provide the following info:

  • MBT Version: v1.0.1
  • OS Version: "Ubuntu 18.04.2 LTS"

Steps to Reproduce:

1.npm install -g mbt
2.Got (https://github.com/SAP/cloud-mta-build-tool/files/3900865/log_file.zip)
an error, permission denied to use command mkdir

ERR { Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/mbt/unpacked_bin'
at Object.fs.mkdirSync (fs.js:885:18)
at /usr/lib/node_modules/mbt/node_modules/binwrap/binstall.js:46:10
at new Promise ()
at untgz (/usr/lib/node_modules/mbt/node_modules/binwrap/binstall.js:21:10)
at binstall (/usr/lib/node_modules/mbt/node_modules/binwrap/binstall.js:11:12)
at install (/usr/lib/node_modules/mbt/node_modules/binwrap/install.js:20:10)
at Object.install (/usr/lib/node_modules/mbt/node_modules/binwrap/index.js:14:14)
at Object. (/usr/lib/node_modules/mbt/node_modules/binwrap/bin/binwrap-install:18:9)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/lib/node_modules/mbt/unpacked_bin' }

  1. Workaround (this command works): sudo npm install -g mbt --unsafe-perm=true --allow-root

Solution found in : npm/npm#17268

Seems that the npm install step described in https://sap.github.io/cloud-mta-build-tool/download/
does not work for my system. Perhaps a bug or just need a correction to the MBT guide. Thanks for your help in advance. I have attached a more comprehensive log file of the exception.

log_file.zip

@ShimiT
Copy link
Collaborator

ShimiT commented Dec 1, 2019

@katunin-ng - as this is related to OS user permission, I think we can add it to the troubleshooting guide.

@ShimiT
Copy link
Collaborator

ShimiT commented Dec 9, 2019

Fixed, added to the troubleshooting section.

@ShimiT ShimiT closed this as completed Dec 9, 2019
@DanieleStrafile
Copy link
Author

thank you @ShimiT !

@leotrinh
Copy link

i've got same issue and resolved by add -unsafe-perm=true --allow-root

Full command: npm i -g mbt -unsafe-perm=true --allow-root
Hopefully can help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants