Search code examples
react-nativenpmexpoeas

I get this error while running eas: "zsh: command not found: eas"


I'm not sure if this is a common error but I recently ran into this and it took me quite a bit to get this fixed. If any other answers ?

please share.


Solution

  • The error occurred probably because the dependency which you're installing is not being installed globaly, so you'll need to change the "PATH" so it installs globaly.

    If you've already ran:

    sudo chown -R $USER /usr/local/lib/node_modules
    

    and you still get nothing, you'll most likely need to change the node_module PATH:

    mkdir "${HOME}/.npm-packages"
    
    NPM_PACKAGES="${HOME}/.npm-packages"
    
    prefix=${HOME}/.npm-packages
    
    NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
    
    PATH="$NPM_PACKAGES/bin:$PATH"
    
    unset MANPATH
    
    MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
    

    then run:

    npm install -g eas
    

    Hope this helped you, if not good luck.