1
votes
$ sudo npm install -g expo-cli
[sudo] password for maky: 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules/expo-cli/node_modules/@expo/traveling-fastlane-darwin):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! Unexpected end of JSON input while parsing near '...G20jDnNTkEHGTUpd\n3Yv'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-09T08_40_53_546Z-debug.log
2
Have you tried to clean cache with npm cache clean --force? - Shlang
Yes, Still not working... - Himanshu Sharma

2 Answers

0
votes

You can try installing with Yarn yarn global add expo-cli Please make sure you have installed yarn. You can check if yarn is installed by yarn --version.

0
votes

i've already installed expo with yarn but when i try to create a project using expo i got this output:

$ expo init gg

Command 'expo' not found, did you mean: command 'expr' from deb coreutils (8.32-3ubuntu1) command 'expn' from deb sendmail-base (8.15.2-20) Try: sudo apt install