Can't install expo-cli

Hello, today I updated the expo-cli and after the update my expo-cli directory were deleted and I wasn’t able to reinstall it with npm install -g expo-cli

I deleted all the modules nodejs npm and reinstall it but still the same issue after i want to install the expo-cli ( and yeah i started / installed it with sudo )

I’m getting a lot of errors like:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-darwin-x64.tar.gz

ERR! sharp EACCES: permission denied, open ‘/usr/local/lib/node_modules/expo-cli/node_modules/sharp/1704-libvips-8.7.4-darwin-x64.tar.gz’

info sharp Attempting to build from source via node-gyp but this may fail due to the above error

info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/expo-cli/node_modules/sharp/build’

gyp ERR! System Darwin 17.7.0

gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”

gyp ERR! cwd /usr/local/lib/node_modules/expo-cli/node_modules/sharp

gyp ERR! node -v v12.2.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm WARN ts-pnp@1.1.2 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.

------and-------

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! sharp@0.22.1 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the sharp@0.22.1 install 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/funky/.npm/_logs/2019-05-09T12_21_48_476Z-debug.log

hi, I’m also facing same issue with my iMac… solved with command --unsafe-perm . I’m not sure if this step recommended or not but its works…

expo ver : 2.17.1

sudo npm install --unsafe-perm -g expo-cli

4 Likes

hey i didnt test it. I just installed it with yarn and it works fine for me :smiley:

1 Like

I was able to solve this by changing the permissions of the
/usr/local/lib/node_modules/npm folder. I added read & write permissions for the administrator user group.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.