Is there a way to establish a connection between a Firebird database and a React-Native application? - react-native

Our project relies on displaying data from a Firebird database on a React-Native application.
If I import the Firebird library we get the error:
"Module 'net' does not exist in the Haste module map"
Following the given instructions doesn't change anything.
Typing so much as this is enough to cause the error:
var Firebird = require('node-firebird');
We tried working with this npm package.
My colleague spoke to an online React-Native teacher and it seems both frameworks are indeed incompatible. If possible, I'd hope to get more clear input on the matter, and if there exists any alternatives, I'd be glad to hear them.

Related

Trying to install React in Visual studio code?

I am just learning react now. I tried to install react app so many times in my Visual studio but It didn't work. It always shows installing required packages and I've waited so many hours with so many tries it didn't worked as well. I have this issue only and Node install 'my-app' folder with simple json file only. Anyone knows what's the problem here?
enter image description here
I tried to update Node recent version but it was already updated. Even i tried Non LTS supoert Node version it couldn't helped me.
I tried different types of package manager like 'npm' and 'yarn' instead of using 'npx' but then I know these package managers supported before node version 5.2 or 5.8, I think.
I searched for this problem in youtube nothing else there.
I used metered network in my PC but when I used WiFi with stable connection also it didn't install.
I tried so many different extensions in Visual studio, I thought it would be help but none happened.
What are the problems here? and What i want to do pls explain to me, bros.

reSolve and React Native integration

Is there any working example available involving reSolve in React Native?
Suggestions of comparable solutions (running without any back-end connectivity in place) either in React Native or Flutter are also most appreciated.
GitHub contains an example in the reimagined/react-native-example repository but unfortunately it isn't working. It seems the current version is pretty outdated.
Referring to that repository, the command yarn create resolve-app -e shopping-list-advanced shopping-list-advanced results in the following error message.
Error: No such example, shopping-list-advanced. The following examples are available
So you are unable to download the sample code since it does not appear to exist.
So I tried downloading and inflating the ZIP manually. Afterwards I ran yarn install (which takes a while and reports quite a lot of warnings). Next, I used the command yarn start:native. This doesn't work either and results in the following error message.
ERROR: Node.js version 16.13.2 is no longer supported.expo-cli supports following Node.js versions: >=10.13.0 <11.0.0 (Active LTS) >=12.0.0 <13.0.0 (Active LTS) >=13.0.0 <14.0.0 (Current Release)
In an attempt to solve the problem, I updated the expo-cli version in the native\package.json file to 5.0.3. Running yarn install and yarn start:native again results in a new error message being thrown error.
Invalid regular expression:
/(ui[\]node_modules[\]react-native[\].|ui[\]node_modules[\]expo[\].|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture\bundle.js|.\tests\.)$/:
Range out of order in character class.
This doesn't seem to go anywhere... In other words, I am a bit stuck here since I don't know what this message actually means.
Thank you for your feedback.
The team decided to extract the React Native example to a separate repository and postpone its maintenance to keep focused on more important tasks like polishing the server-side.
As you mentioned, the example is outdated, there are many changes in the client configuration since then. In the future, we may work on some guide on how to use reSolve in React Native and other frameworks.
In the meantime, you can try to add reSolve in your ReactNative app using our docs.
We provide several client libraries that can be helpful:
https://reimagined.github.io/resolve/docs/api/client/resolve-client/
https://reimagined.github.io/resolve/docs/api/client/resolve-react-hooks/
https://reimagined.github.io/resolve/docs/api/client/resolve-redux/
Feel free to contact us through Github in case of any difficulties, we'll be glad to help you.

Given an npm package, how do I know whether it will work in browser?

I've recently installed some npm package (recommended Kubernetes client) for my react app.
After writing code that uses the package and deploying the code for testing I got some weird errors about missing functions or packages. Then I've read the documentation and realized that the package was Node-only.
Is there any way to check that the npm package works in browser before writing code that uses the package?
Python packages specify compatible python versions. Do npm packages have something like this whether they indicate support for particular Node versions and the browsers?
Some packages/libraries contain .browserlistrc file which I've found to be a starting point to find out the browsers and platforms the devs intend to support or have their code compile for. While it may not always be true and the package might just be able to support a browser that isn't mentioned, it's a good starting point. It surely helps to find out if IE (the bane of front-end dev) is supported or not.
Then again many packages don't necessarily include a .browserlistrc. You can then check the package.json for a "browserslist" field.
If neither are found, you can always clone the repo and add your own .browserlistrc in the root with queries that will let you know if the package supports your intended browser or platform - little more work but yeah it can help. Not full proof but a decent enough way to find out.
Though the best answer is really to just ask the maintainers.

How to troubleshoot React Native build error?

Below you can see the output I get when I try to run npx react-native run-android. It suggests some options to try in order to further pinpoint the problem, however they don't work with the aforementioned command so I assume that they are related to a gradle (just an educated guess).
I know ZERO about gradle; I have just seen the name here and there and in the output shown below. So please keep that in mind when you answer. If I need to learn how to run some gradle command(s) directly, please be as verbose as possible in your answer.
The project was working fine just a bit ago, but I wanted the ability to force portrait mode for certain screens but without configuring my entire app to always have to stick to portrait mode. So I found what looked to be a solution in the react-native-orientation-locker module. I installed it with yarn and then proceeded to update files as directed: https://www.npmjs.com/package/react-native-orientation-locker.
After updating the appropriate files, I got an error that suggested axios was the problem. I uninstalled and reinstalled axios. After that didn't work, I proceeded to undo all the file changes I had just made. Then I uninstalled the react-native-orientation-locker module.
To my knowledge, I have undone everything I did between the time the project worked and stopped working.
Sadly, I had not put this into source control yet (a mistake I won't make again), so I can't revert.
Where to go from here?
Problems like this are hard to pin point. What you can do is open the android project in android studio and see the logs as the project is being assembled. I assume you do not have much knowledge about android either so you might need some senior resource to help you.
What I usually do in this case is open android studio and if I am lucky enough, it tells me which file has an issue and I go to the file and do what android studio suggests me. Some times it fixes the problem and sometimes it doesn't.
Another thing I would like to mention is that the documentation of the package you are using is important to follow. I assume you did that already but I would suggest to review it narrowly and closely.
Another guess I can tell you is try to go to your-project/android/build.gradle and over there, you'll see something like this in the start. The package you are using mentions something about target SDK 27. I think you should check that out too. May be it helps
Lastly I would say always use source control while working with react native. It can easily blow up at any time so you should always have a safety net to fallback to :)

Problems building an Sql Server Database Project: comparison, refactoring warnings, etc

A colleague of mine is having problems building a Sql Server Database Project in visual-studio-2013. He shared his screen with me, hoping I could help him solve the following issues:
In case you can't see the image, there's a build error stating that "The comparison cannot continue until the build error is resolved" and a build warning that goes "Refactoring operations exist in the source, but will not be shown in the comparison.".
Not being too familiar with Sql Server DB projects, I tried searching the exact same messages on Google... only to find absolutely nothing.
Can anyone help? What does these messages means, why are they appearing and how can we expect to successfully build the project?
I had this same issue but it went away when I followed the instructions of the accepted answer of this post: VS2013 Database Project fails to build.
It turns out that the project was not building. The error described in this post was misleading and was probably only a symptom of the real error which was that the project could no build.
In case that link is no longer available, the solution was to install the Microsoft SQL Server Data Tools. You can do that by downloading the install package from here.