Expo init does not work in my terminal on a mac, vscode
- User
Expo init does not work in my terminal on a mac, vscode
- Assistant
Expo init does not work in my terminal on a mac, vscode
I'm sorry to hear you're having trouble with expo init on your Mac and VSCode. Let's go through some steps to troubleshoot and resolve the issue.
Node.js and npm/yarn installed: Ensure you have Node.js and npm or yarn installed. You can check this by running:
node -v
npm -v
yarn -v
Expo CLI installed: Ensure the Expo CLI is installed globally. You can install or reinstall it using:
npm install -g expo-cli
Sometimes, terminal permissions might be an issue. Ensure the terminal has the necessary permissions to execute commands.
Update Homebrew and related packages:
brew update
brew upgrade
brew doctor
Ensure that your system PATH includes the directories where node and npm are installed. Add the following to your .bash_profile, .zshrc, or .profile, depending on your shell:
export PATH=$PATH:/usr/local/bin
Then, source the file to apply the changes:
source ~/.zshrc # or the file you edited
Instead of using the globally installed Expo CLI, you can use npx to ensure you’re using the latest version:
npx expo init my-new-project
If none of the above works, you might want to reinstall Node.js and npm/yarn:
brew uninstall node
brew install node
Sometimes firewall or antivirus software can interfere with CLI tools. Try temporarily disabling them and see if it resolves the issue.
Make sure your internet connection is stable as expo init might require downloading some templates.
You can check the Expo diagnostics to see if there’s anything wrong:
expo diagnostics
If expo init command fails, take note of the error messages or logs in the terminal. These logs can provide clues about what might be going wrong.
Here is an example workflow from the beginning:
node -v
npm -v
npm install -g expo-cli
expo init my-new-project
npx:
npx expo init my-new-project
If none of these steps work, consider reaching out to:
I hope this helps! If you have more specific error messages or issues, feel free to share them for more tailored assistance.
Not yet included in a published release.