1. Create a local folder where the project is located
My Mac’s host environment variable was set to x8664-apple-darwin13.4.0. Seems like others have problems with it being set like this too. This makes sense to me. My mac’s chip architecture.
This is only for Mac. If you aren't using Mac for React Native dev - do it, it's pretty great. Setting up a react native environment Steps Software installs and file setup Install Xcode from the app store - Xcode is a program that runs iOS apps for you, and lets you start a simulator for your app so you can develop without needing a physical. Create React App. Create React App is a comfortable environment for learning React, and is the best way to start building a new single-page application in React. It sets up your development environment so that you can use the latest JavaScript features, provides a nice developer experience, and optimizes your app for production. To stop the program, open your terminal and press Ctrl-C (it's the same on Windows, Mac & Linux). Unfortunately, closing your terminal will not stop the program from running. Once you have stopped running the program, your React app will stop working. To start it again, see the instructions above for starting your app. Starting a new JavaScript project with React used to be a complicated process. But now, Create React App includes all the JavaScript packages you need to run a React project, including code transpiling, basic linting, testing, and build systems. If the command just isn’t installed on the Mac, for common examples like wget, htop, or the many other useful unix commands available as Homebrew packages that are not otherwise preinstalled in Mac OS, then the simplest solution is to install and use Homebrew on the Mac to gain access to those command line utilities. Homebrew is a great tool. Actually, I npx create-react-app my-app one month ago, and it works! But today, I can create a new one but cannot run it. But today, I can create a new one but cannot run it. Plus, I changed my hosts yesterday, just add a domain, so it seems not the hosts problem.
2、npm -g create-react-app
3. In this folder, create react app react demo (project name)
4、cd react-demo
5. NPM start (wait for a while for browser to start automatically)
6. Start writing the code you need
7. (emphasis) on package.json Add a sentence in the configuration file: “homepage”: “.” / “(to prepare for the following packaging. If you do not add this sentence, the page opened during preview will be blank, and the reason is that the path is wrong)
8. NPM run build
9. Create a new warehouse on your GitHub and copy the address for future use
10. Git init under project folder
11. Git add
12. Git commit – M “XXXXXXXX”
13、git remote add or iginhttps://github.com/xxx/xxx (the address you saved on GitHub)
14. Git pull origin master
15. Git push – U origin master
16. At this point, you can see the code just submitted on the corresponding repository of GitHub.
Create React App Eject
17. Click “setting”; find GitHub pages in source, click the button below to switch to master branch and click save. You can see a link. Click the link and find that the one in your project appears README.md ;
18. Add / build / ා enter after the link to see the preview effect.
19. After modifying the code, NPM run build again and repeat steps 11-15.
Tips: if you find that the build folder is not uploaded to GitHub, delete the code that ignores build in the. Gitignore file
Force quit the app, then open it again
- iPhone, iPad, iPod touch: Force the app to close.
- Apple Watch: With the app open, press and hold the side button to show the power options. Then press and hold the Digital Crown to quit the app.
- Apple TV: Double press the TV/Home button and swipe left or right to find the app with the issue. Then swipe up to close the app. You can’t force apps to quit on Apple TV (3rd generation).
Restart your device
Restart your iPhone, iPad, iPod touch, Apple Watch, or Apple TV. Then open the app to see if it works as expected.
Check for updates
Make sure that your device has the latest version of iOS or iPadOS, watchOS, or tvOS. Then check for app updates.
- iPhone, iPad, iPod touch, or Apple Watch: You can manually update apps. You might need a Wi-Fi connection to update some apps on your iPhone, iPad, or iPod touch.
- Apple TV: Go to Settings > Apps and turn on Automatically Update Apps. If you don't have automatic updates turned on, you can open the App Store, go to the Purchased tab, and open an app's product page to see if an update is available.
Reinstall the app
Create React App Proxy
- iPhone, iPad, iPod touch: Open the Settings app. Tap General, then tap iPhone Storage (or iPad Storage). Tap the affected app, then tap Offload app. Tap Offload app again. Wait a moment for the app to offload, then tap Reinstall App.
- Apple TV: Highlight the app on the Home screen, then press and hold the Touch surface until the app jiggles. Press Play/Pause, then select Delete. Open the App Store and redownload the app. Some apps require subscriptions for activation. If you can't activate the app or you don’t remember your sign-in information, contact the app developer.
- Apple Watch: Open the Watch app on your iPhone and tap the My Watch tab. Scroll to the app you want to remove, then tap it. Turn off Show App on Apple Watch, and wait for it to disappear from your watch's Home screen. To reinstall the app, scroll down to Available Apps in the My Watch tab and tap Install.
Create-react-app Not Working Macbook Pro
Contact the app developer
If you're having an issue with an Apple app, contact Apple Support. If it's a third-party app, contact the app developer.
Learn more
- Get help with unfamiliar charges and in-app purchases.
- If you can’t install or update an app, or if it’s stuck waiting, learn what to do.
- Get help with audio, video, or power on Apple TV.