shell
shell copied to clipboard
Unable to install on Ubuntu 16.04
Issue #303
I see exactly the same error on ubuntu system.
cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
/usr/local/bin/fsh -> /usr/local/lib/node_modules/@ibm-functions/shell/bin/fsh
> @ibm-functions/[email protected] postinstall /usr/local/lib/node_modules/@ibm-functions/shell
> node bin/install.js
/usr/local/lib/node_modules/@ibm-functions/shell/bin/install.js:73
if (err) throw err
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@ibm-functions/shell/tmp-9974OKz8wy2WbEEx'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ibm-functions/[email protected] postinstall: `node bin/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ibm-functions/[email protected] 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:
npm ERR! /home/parselva/.npm/_logs/2018-02-01T14_36_14_941Z-debug.log
$ node --version v8.9.4 npm --version 5.6.0
Thanks for the bug report! Have you tried sudo?
Yes... tried with sudo
$sudo npm install -g @ibm-functions/shell /usr/local/bin/fsh -> /usr/local/lib/node_modules/@ibm-functions/shell/bin/fsh
Same issue on Fedora 27
thanks for the confirmation @gpoul
can you provide the nodejs version you have installed?
[gpoul@localhost ~]$ node --version
v8.9.4
[gpoul@localhost ~]$ rpm -qa |grep nodejs
nodejs-8.9.4-2.fc27.x86_64
if someone is facing this issue, they can try with these extra args --unsafe-perm=true in npm install command. It should work.
npm install -g @ibm-functions/shell --unsafe-perm=true
Thank you. We also now offer direct download links via the Releases tab on the GitHub page.
Same error on MacOS, needed this to install:
sudo npm install -g @ibm-functions/shell --unsafe-perm=true