Native Base Linking Issue - reactjs

I have been trying to use NativeBase.io provided library for React Native. However the command native-react link does not work regardless of what we do. It shows the error as mentioned below.
Now i found from somewhere that the upgrade needs to happen and than running again should solve this but after even doing that its did not.
Appreciate all of your assistance.
Cannot read property 'pbxprojPath' of null

I got this filled by following the following command
sudo sudo npm install
Once this is done, i just go on and run my command to open the emulator. Hope this helps to the people having the same issue.

Related

I keep seeing ShortMove on Chess.js tutorials, but it's not there anymore

I'm trying to make a chess game using react. I am using chessboardjsx and chess.js. I am working with an online tutorial:
https://levelup.gitconnected.com/how-to-create-a-simple-chess-app-with-react-e18c0179b167
In this, they use ShortMove to handle moves, but it gives me an error when I try to import it because it's not in Chess.js. Maybe I'm doing something stupid but I think it was removed or changed in Chess.js.
Here is an image to show the issue.
](https://i.stack.imgur.com/C7Amy.png)
I tried to use Move rather than ShortMove, but Move needs a bunch of properties like color, piece, flag, and sans, which ShortMove doesn't need. Here's the error I get.
Can someone tell me if there is an alternative or how I can make Move work? Thanks in advance!
ShortMove is a Typescript type, if you are not using Typescript you don't need to worry about that and can remove it.
If you ARE using typescript and they do not show up you should made sure that in addition to installing the Library from with npm install chess.js you also installed the types by running:
npm install -D #types/chess.js
from the commandline
That command comes from the instalation instructions here:
https://github.com/jhlywa/chess.js/blob/master/README.md

Cannot Find Module 'block-stream'

I'm trying to make a new react-js site using npx create-react-app
The Error I get is Error: Cannot find module 'block-stream'
I redownloaded node and tried again but still getting the same error
what can I try to fix this?
Correct me if I'm wrong on anything here, I'm not really a React or Node developer.
However, I'd guess, if it's an addon or additional package, it may not be installed by default. You might try figuring out if you can install it, somehow.
I don't know if this is what you meant, but I did find this webpage with some details on installing it.
In addition, if you don't want to use blockstream, and didn't intentionally include it, and this error is being shown to you for seemingly no reason, I'd suggest looking through your codebase to find any references to that code.
I wish you luck :)

React-navigation installation error(following official docs). Unable to resolve module #react-navigation/native-stack

There are a bunch of questions already covering this exact error, but I've been through all of them, and so far none of the answers have worked for me. Platform is MacOS
Here is the error:
Steps to reproduce
(Following official React Navigation docs https://reactnavigation.org/docs/getting-started/):
Create a new expo managed app
expo init my-app
Navigate to directory
Start the app
expo start
**** At this point everything starts and works correctly ****
Install reactnavigation(follow official docs https://reactnavigation.org/docs/getting-started/ )
yarn add #react-navigation/native
Install dependencies
expo install react-native-screens react-native-safe-area-context
Wrap the code with a Navigation container (per the docs)
Start the app
expo start
**** App no longer works. Fails with the error I posted earlier ****
Things I've tried that haven't worked
The instructions that the error message provides (though I skip step 1, as I don't have watchman watches installed). Main thing here that I would expect to work is the deletion of node_modules and yarn.lock, but no luck :(. Same with deleting cache
using yarn add to add the dependencies instead of expo install
using npm to install everything
updating expo-sdk (I'm already on latest)
reinstalling everything
So, I actually was able to answer my own question in the process of writing it. I often do this, as I make sure to spend several hours trying to debug in the process of writing the question and making sure I've covered everything I can think to try.
Not sure of official self answer etiquette, but this was a pretty frustrating error for me, so I figure I'll post what worked for me here in case it can help anyone else in the future.
Answer:
The issue for me had nothing to do with the code or app itself, but rather the IOS simulator. Force quitting the simulator and restarting resolved the error. It seems that simply ctrl^c -> expo start -> i -> r is not enough to clear the internal state of the simulator.
There was actually even a clue in the error message itself, but I missed it because the error looked so similar to the one I was expecting. The clue was in the name of the module it was unable to resolve "#react-navigation/native-stack". In my reproduction steps, I was only using the NavigationContainer, as I was trying to get that working before installing any of the Navigators and trying to use those.
Why was it trying to resolve the native-stack navigator? I'm not 100% sure, but my guess is that there was some kind of cache in the simulator that wasn't being cleared properly. Why do I think that?
This problem started with me trying to use a native-stack navigator in another app I'm working on. I quickly ran into this error, and figured the best way to debug would be to spin up a brand new blank app and try to get ReactNavigation working in there. I started with just navigation package and NavigationContainer itself, and once I couldn't even get that working, I assumed the problem was with the base react-navigation package installation. I failed to notice that it was still trying to resolve that native-stack navigator.

yarn create next-app returns error, but create react-app works just fine

I'm trying to start a nextjs project, and as of the documentation i'm running
yarn create next-app appname
But this command executes and returns an error.
Can someone help me fix this? And please, explain why this error occurs so in the future i'll know how to deal with it.
Many thanks!
Noticed that the username contains a space, and that originates the error.
Changing the windows username to a single thing without any spaces fixed the issue.

AngularJS tutorial - missing web-server.js file, attempting to follow instructions exactly

I am attempting to follow the AngularJS tutorial.
The documentation specifically mentions using nodejs to start a basic server. See http://docs.angularjs.org/tutorial/ step 5: "you can use node to run scripts\web-server.js, a simple bundled http server."
That's great, but web-server.js is not part of the angular-phonecat project. I followed the instructions exactly. The file is even missing from the from the master repo on github: https://github.com/angular/angular-phonecat/tree/master/scripts
So, could someone please either A) provide the web-server.js file, or B) tell me what I'm missing.
Thanks
As far as I understand they use http-server like dependency for npm.
So after
npm install http-server -g
you can simply run
node http-server
UPD:
found even more simple way - run in project dir:
npm start
Same thing for me! There was a revision that deleted this file, so I checkout out the earlier revision and have copied the web-server.js from it: 7b1d98830f5f7780108da3755b84c2713be3eb44
The answer is simple - the tutorial is changing and web-server.js is no longer needed. However, I started the tutorial before it was updated to reflect the change.
Thanks everyone for looking into this.
Run the Command ng add #nguniversal/express-engine this will create server.ts file.
Try to execute the node scripts/web-server.js with administrator access. (command)

Resources