React Native (MAC) terminal modified ~/.BASHRC, ~/.profile, ~/.ZSHRC

Source: Internet
Author: User
Tags save file

In react Native, after we use brew to install NVM, and after the project is created, the next time you use Xcode7 to open the project, you find that the run failed. The reason is that NVM is not available for the following reasons:

Cause: Make sure to set it up in your bash or zsh profile after the brew is installed, otherwise when you restart the terminal, you will notice that node, NPM environment variables are invalidated.

1. Open Terminal (terminal)

2, cd ~ (enter the current user's home directory)

3. Open. Bash_profile (Opens the. bash_profile file, creates the file if the file does not exist: Touch. Bash_profile Edit file: open-e. bash_profile)

4. Directly change the contents of the. bash_profile file that pops up, and paste the following in:

export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh

5. Command + S Save file, then close.

6. In terminal (terminal), enter source. bash_profile (using the content you just updated).

React Native (MAC) terminal modified ~/.BASHRC, ~/.profile, ~/.ZSHRC

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.