Unable to install on a MacBook Pro High Sierra #303
Description
This is similar to Cannot install on MAC #297
issue sudo npm install -g @ibm-functions/shell
get error:
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@ibm-functions/shell/tmp-37712D1huM2Lxb4co'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ibm-functions/shell@1.3.402 postinstall: node bin/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ibm-functions/shell@1.3.402 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried to change the permissions as mentioned in issue 297 but when I tried that I get "Operation not permitted"
sudo chmod ugo+rwx -R /usr/local
chmod: -R: No such file or directory
ls -lO /usr
total 0
drwxr-xr-x 976 root wheel restricted 31232 Jan 24 10:02 bin
drwxr-xr-x 292 root wheel restricted 9344 Jan 24 10:02 lib
drwxr-xr-x 234 root wheel restricted 7488 Jan 24 10:02 libexec
drwxr-xr-x 17 root wheel sunlnk 544 Jan 4 10:49 local
drwxr-xr-x 247 root wheel restricted 7904 Jan 24 10:02 sbin
drwxr-xr-x 45 root wheel restricted 1440 Dec 18 09:22 share
drwxr-xr-x 5 root wheel restricted 160 Oct 25 12:33 standalone
Activity
starpit commentedon Jan 30, 2018
thanks @ljmwaugh for the bug report!
to help us understand better, would you be able to share a few details of your setup:
node version
how did you install nodejs? from nodejs.com? or via homebrew? or?
thanks!
Param-S commentedon Feb 2, 2018
I am facing the same issue on my mac...
MacBook-Pro:
$ node --version$ npm --versionv8.9.4
MacBook-Pro:
5.6.0
node installer is downloaded from nodejs.org
giulianodm commentedon Mar 15, 2018
Hi,
Same issue for me. Logs are below.
sudo npm install -g @ibm-functions/shell
/usr/local/bin/fsh -> /usr/local/lib/node_modules/@ibm-functions/shell/bin/fsh
/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-58718tBkSEZPSnzPF'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ibm-functions/shell@1.3.428 postinstall:
node bin/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ibm-functions/shell@1.3.428 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! /Users/giulianodm/.npm/_logs/2018-03-15T22_50_25_260Z-debug.log
$ node -v
v8.9.4
$ npm -v
5.7.1
starpit commentedon Mar 17, 2018
thank you very much for the info @giulianodm. this issue is near or at the top of the triage list!
starpit commentedon Mar 19, 2018
@giulianodm when you have a chance, could you give it another quick shot?
npm install -g @ibm-functions/shell
i suspect you will still have an issue, but there is a chance that this quick fix has remedied the issue. thanks!
if the issue persists, please let me know how you installed NodeJs (e.g. from nodejs.com, using brew, etc.), and i'll continue to pursue this issue.