Tumgik
#troubleshmup: react-native
troubleshmup · 6 years
Text
Learning React Native: notes
Immediate snags when installing dependencies:
==> Pouring [email protected]_3.high_sierra.bottle.1.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
 ^ Didn’t have a usr/local/Frameworks folder for python and had to figure out how to fix that.
Solution: Used $ brew doctor and, created folder, created ownership, and linked folder. Then, tried to install watchman again. Success!
https://github.com/Homebrew/homebrew-core/issues/19286 
https://github.com/Homebrew/homebrew-core/issues/19286
Silly error when trying to run $ react-native run-android, says it can’t find the debug app. or something like that.
Solution: you have to have the emulator running lol
Running iOS significantly less setup (although I did already have Xcode installed so.. ) but this another error, this one rather obscure... 
Solution: Xcode has to be updated but you have to actually open it to have the updates install. Afterward, running the command was fine.
https://github.com/flutter/flutter/issues/16271
{this.state.text.split(' ').map((word) => word && '🍕').join(' ')}
This code had me confused. Why is it pizza and not a boolean?
Solution: JavaScript is weird haha. The && operator returns the first ‘falsy’ value, and finding none, returns the last ‘truthy’ value. 
https://stackoverflow.com/questions/5417969/why-dont-logical-operators-and-always-return-a-boolean-result/32158899#32158899
0 notes