macOS running the react project

Install the basic environment, do not go into details. Mainly including nodejs, npm and other tools

Projects built on Windows, opened on macOS, encountered several problems.

0. Execute npm install in the project root directory

1. Node_modules directory permission problem, execute chmod -R 777 node_modules in the project root directory

2. Unrecognized font family 'Ionicons' The font file cannot be found, open info.plist in Xcode, create a new item of Fonts provided by application , then npm install rnpm, go back to the project root directory, and execute rnpm link . There is no need to copy the font directory into the Xcode project.

3. Regardless of 3*7=21, execute npm uninstall react-native-vector-icons , and then execute npm install react-native-vector-icons --save

Basically, the above three steps can solve the problem.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324981323&siteId=291194637