Problems installing expo-cli on ubuntu

Hi – I am having problems installing expo-cli on ubuntu 18.04, and have had similar problems attempting to install on ubuntu 16.04
$ node -v
v10.15.3
$ npm -v
6.4.1
sudo npm install -g expo-cli

@expo/traveling-fastlane-linux@1.8.2 preinstall /usr/lib/node_modules/expo-cli/node_modules/@expo/traveling-fastlane-linux
node platform.js

/usr/bin/expo-cli → /usr/lib/node_modules/expo-cli/bin/expo.js
/usr/bin/expo → /usr/lib/node_modules/expo-cli/bin/expo.js

iltorb@2.4.2 install /usr/lib/node_modules/expo-cli/node_modules/iltorb
node ./scripts/install.js || node-gyp rebuild

WARN install EACCES: permission denied, access ‘/home/john/.npm’
gyp WARN EACCES user “root” does not have permission to access the dev dir “/home/john/.node-gyp/10.15.3”
gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/lib/node_modules/expo-cli/node_modules/iltorb/.node-gyp”
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/expo-cli/node_modules/iltorb/.node-gyp’
gyp ERR! System Linux 4.15.0-46-generic
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /usr/lib/node_modules/expo-cli/node_modules/iltorb
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
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”:“linux”,“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”:“linux”,“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”:“linux”,“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”:“linux”,“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”:“linux”,“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”:“linux”,“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”:“linux”,“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”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-win32-x64@2.2.8-beta.1 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-win32-x64@2.2.8-beta.1: wanted {“os”:“win32”,“arch”:“x64”} (current: {“os”:“linux”,“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”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/traveling-fastlane-darwin@1.8.2 (node_modules/expo-cli/node_modules/@expo/traveling-fastlane-darwin):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/traveling-fastlane-darwin@1.8.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/expo-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb@2.4.2 (node_modules/expo-cli/node_modules/iltorb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb@2.4.2 install: node ./scripts/install.js || node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • expo-cli@2.11.8
    added 1091 packages from 692 contributors in 121.949s
    I have also tried re-installing without sudo and gotten similar problems.

When I follow this install with errors with expo init, I get more errors and failure to complete.

Help getting up and running here would be much appreciated!

Update on this: I have managed to install create-react-native-app, and then create a new app, after fixing a permissions/ownership issue deep in the .npm directory tree. So now I am at least up and running. But my question now is, what am I missing by not installing expo-cli?

Hey @ketch231,

CRNA has been replaced with expo-cli so you’ll need to install that and uninstall CRNA. Are you still getting permissions issues when installing expo-cli?

Cheers,
Adam

expo-cli seems to have been installed with CRNA, either that, or it got installed in a previous attempt in spite of all the errors, apparently having to do with permissions. If I try to upgrade with “npm install -g expo-cli”, however, I get error messages. I have tried using sudo, and not using sudo, and either way I get access violations.
I have successfully installed and used expo-cli on my Windows 10 laptop with no such problems, but on Ubuntu 18.04, I keep getting error messages. Strangely enough, expo currently works on Ubuntu and I am able to get demo apps to load and run on an Android phone.
FYI, I have a desktop running Ubuntu 16.04, and a VM on that machine running 18.04. I have had the same issues on the base machine and on the VM, but I want to use the 18.04 VM to do development.

Thanks in advance for your help.

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