Error installing expo using npm

Hello , i am trying to install expo to use for android (windows 10 64 bit ) but i am facing this problems , i tried Node.js ( 10 and 9 ) npm ( 6.4.1) and i tried with yarn too , none of them work :, i really need it as soon as possible :pleading_face:, this is the message i am getting :
npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.

@expo/traveling-fastlane-linux@1.9.3 preinstall C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\traveling-fastlane-linux
node platform.js

C:\Users\X1 CARBON\AppData\Roaming\npm\expo-cli → C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
C:\Users\X1 CARBON\AppData\Roaming\npm\expo → C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js

iltorb@2.4.3 install C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules\iltorb
node ./scripts/install.js || node-gyp rebuild

info looking for cached prebuild @ C:\Users\X1 CARBON\AppData\Roaming\npm-cache_prebuilds\c677a8-iltorb-v2.4.3-node-v64-win32-x64.tar.gz
info found cached prebuild
info unpacking @ C:\Users\X1 CARBON\AppData\Roaming\npm-cache_prebuilds\c677a8-iltorb-v2.4.3-node-v64-win32-x64.tar.gz
info unpack resolved to C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules\iltorb\build\bindings\iltorb.node
info unpack required C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules\iltorb\build\bindings\iltorb.node successfully
info install Successfully installed iltorb binary!

sharp@0.22.1 install C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules\sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached C:\Users\X1 CARBON\AppData\Roaming\npm-cache_libvips\libvips-8.7.4-win32-x64.tar.gz
ERR! sharp Please delete C:\Users\X1 CARBON\AppData\Roaming\npm-cache_libvips\libvips-8.7.4-win32-x64.tar.gz as it is not a valid tarball
ERR! sharp zlib: unexpected end of file
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see sharp - High performance Node.js image processing for required dependencies

C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules\sharp>if not defined npm_config_node_gyp (node “F:\Programs Installations\Node.js\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…..\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “F:\Programs Installations\Node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (F:\Programs Installations\Node.js\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (F:\Programs Installations\Node.js\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at F:\Programs Installations\Node.js\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command “F:\Programs Installations\Node.js\node.exe” “F:\Programs Installations\Node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd C:\Users\X1 CARBON\AppData\Roaming\npm\node_modules\expo-cli\node_modules\sharp
gyp ERR! node -v v10.15.3
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.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/traveling-fastlane-darwin@1.9.3 (node_modules\expo-cli\node_modules@expo\traveling-fastlane-darwin):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/traveling-fastlane-darwin@1.9.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\expo-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-win32-ia32@2.2.8-beta.1 (node_modules\expo-cli\node_modules@expo\ngrok-bin-win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-win32-ia32@2.2.8-beta.1: wanted {“os”:“win32”,“arch”:“ia32”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-sunos-x64@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-sunos-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-sunos-x64@2.2.8: wanted {“os”:“sunos”,“arch”:“x64”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-x64@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-x64@2.2.8: wanted {“os”:“linux”,“arch”:“x64”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-ia32@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-ia32@2.2.8: wanted {“os”:“linux”,“arch”:“ia32”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-arm64@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-arm64@2.2.8: wanted {“os”:“linux”,“arch”:“arm64”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-arm@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-arm@2.2.8: wanted {“os”:“linux”,“arch”:“arm”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-freebsd-x64@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-freebsd-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-freebsd-x64@2.2.8: wanted {“os”:“freebsd”,“arch”:“x64”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-freebsd-ia32@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-freebsd-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-freebsd-ia32@2.2.8: wanted {“os”:“freebsd”,“arch”:“ia32”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-x64@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-x64@2.2.8: wanted {“os”:“darwin”,“arch”:“x64”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-ia32@2.2.8 (node_modules\expo-cli\node_modules@expo\ngrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-ia32@2.2.8: wanted {“os”:“darwin”,“arch”:“ia32”} (current: {“os”:“win32”,“arch”:“x64”})

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! C:\Users\X1 CARBON\AppData\Roaming\npm-cache_logs\2019-05-07T23_45_44_580Z-debug.log

Hey @rican_darwin,

Can you run expo diagnostics and paste the log that’s printed out here?

Cheers,
Adam

@khantwaikyaw Crap, I zoned out for the past couple of hours trying to fix it and my 4am brain can’t remember what worked. I’d suggest deleting nodejs, npm, and nvm(if you’re using it, its a node version manager). Restart the computer/vps/whatever. Install nodejs 10 from the NodeMasters (or whatever it’s called) repo. Then try again.

Like I said, I’m way too out of it to remember exactly what I did to fix it. Some kind of permissions error that was affected by another node server I was running at the same time. Restarting it got that other program to stop, I think. LMK if none of this helps and I’ll think about it more tomorrow.

1 Like

@zaptrem
I have same problem like you. Could you get the solution?

I am getting same error. Here is the logs:-

wasted my whole day… :frowning: :frowning:

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

1 Like

I try its but same result

Same problem facing on macos

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/amol/.npm/_logs/2019-05-24T10_33_49_766Z-debug.log

1 Like

This worked for me

cd ~/node_modules && npm i expo-cli && sudo npm i -g expo && sudo npm i --global expo-cli
2 Likes

Hi @zaptrem, How do you delete node.js, npm, and nvm? I’m on a Mac.

in windows how i write this ?

Hi, Thanks for the help but same error getting.

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/amol/.npm/_logs/2019-05-27T05_12_56_380Z-debug.log

How about this?
sudo npm install -g expo-cli --unsafe-perm=true --allow-root

3 Likes

Hi, Thanks for your reply. Still, the same issue faced. I think need to reinstall node and npm and then follow the next step. Can you please guide me how I can reinstall node and npm in mac.

Error as below :-

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/amol/.npm/_logs/2019-05-28T05_12_07_062Z-debug.log

This solved my issue. Thanks!

None of these responses will permanently fix this, and many of them shouldn’t be used due to security issues (especially if you’re on a Mac because part of this is System Integrity Protection configurations that will get overwritten on system updates).

Instead, just change you global npm modules folder variable to a folder in your home directory; your user owns this so you shouldn’t run into this issue again.

Here’s instructions: Resolving EACCES permissions errors when installing packages globally | npm Docs

This will fix the issue permanently for Expo and any other situations where you run into this ( I ran into the same issue with Loopback recently, too on a machine other than my main and this solved that, as well).

This also applies to Windows, btw.

I worked for me, was entirely a permission issue. Thanks a lot !

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