Search code examples
vue.jsexpovue-native

why does error about global installation of Expo CLI occur for vue-native init command?


First, some environment details -
Virtual Box 6.0
guest OS: Ubuntu 18.04
host OS: Windows 10
package versions on guest -
nodeJS 8.10.0
npm 3.5.2
expo-cli 3.9.1
vue-native-cli 0.1.1

Now for the issue and question -
When the vue-native init my-vue-app command is executed while in a location in the home directory of the guest the response is the following:

An error occurred while getting Expo CLI version
Please globally install expo-cli

However, Expo CLI is installed globally
enter image description here

What is causing this error when Expo CLI is already installed globally? What should be done to get the vue-native init my-vue-app command to execute successfully?


Solution

  • I was able to get the vue-native init my-vue-app command working by starting with a clean VM and doing the package installation differently than on the first VM. Two changes were made on the second VM:

    • Node version manager (called n) was used to install NodeJS and npm (rather than using curl)
    • Expo CLI was installed globally using npm (not Yarn)

    I'm not sure if one of these changes or both were necessary to get Vue Native to work because they were not tested separately but Vue Native is working now! Woo hoo!

    Here is a screenshot of the package versions on the working VM:
    enter image description here