Javascript version mismatch for Tabris framework - javascript

Few month ago I gave a try to Tabris, a nice framework for the development of native Android and iOS apps in Javascript. I wanted to get back to it today but my test app has javascript version issues.
First, the QR code scanning on Tabris mobile app side failed with error udefined. I setup the IP address manually and the app got connected to the Tabris server running on my laptop. However, the console on the mobile app complains with: Version mismatch: Javascript module "Tabris" (version 3.5.0) is incompatible with the native tabris platform (version 3.6.0)..
I started by upgrading tabris-cli with npm i -g tabris-cli. It didn't help. Then I uninstalled and reinstalled both the mobile app and tabris-cli. Both are now in version 3.6.0 but the same error remains.
Any idea ?

The Version mismatch error stems from the fact that the native application code and the code of the JavaScript framework of your project are different. If you look at the package.json file of the directory where you are running tabris serve it will probably have the tabris dependency set to 3.5.0
You can update it by running this command:
npm install tabris#3.6.0 --save

Related

How do I fix "Your Ruby version is 3.1.2, but your Gemfile specified 2.7.5" when installing React-Native?

How do I fix this error?
error Your Ruby version is 3.1.2, but your Gemfile specified 2.7.5
✖ Installing Bundler
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
I am using macOS and home-brew as well.
I've tried changing ruby version to 2.7.5 using rbenv. However, when I type rbenv global 2.7.5 or rbenv local 2.7.5, it won't change the version.
The command you’re looking for is rbenv shell 2.7.5. This will change your shell environment to run in the necessary Ruby version.

Syantax Error in a JavaScript login Controller file

I am trying to deploy the Litefarm open source project. I have first deployed it on Windows and it's working, but now I have to deploy it on Linux. I am trying on Ubuntu 20.04, but I am getting some syntax errors in the "loginwithgoogle" function although the same code was working perfectly on Windows.
The function:
Ubuntu terminal:
It's because your are running a NodeJS version on Linux that it doesn't support conditional chaining.
See your node version doing on the command line:
node --version
Optional chaining is currently not supported in Node.js version 13 and below.

Deploy create-react-app build version to Heroku

I'm working with a create-react-app generated app which I'm deploying to Heroku. I would like to test out the production version npm run build in an actual server.
Is it possible to serve the build version instead of the development version to heroku? It's okay if I can no longer have the dev version up in that heroku instance.
If possible, how can I do so, I have been searching up and nothing comes up
If you're following standard documentation on how to deploy react app to heroku, you're already running the production build on heroku.
That documentation uses create-react-app-buildback for deployment and serving the app via Nginx. You can refer to this section that explains that the app is served from build directory
There is a way to verify this too. If you have react developer tools extension installed on your browser, it shows if the app is running production version or development version.

React Native app, installing release apk, parse error

meizu m2 mini android 5.1 screenshot
I have parse error on some devices, but i cannot find reason, because for example it works on one Meizu and not working on another Meizu, and the same with android version, it work on Android 5 on one phone and not working on another phone with android 5. It not works if i build app release apk and try to install it manually, but if i try to debug with usb cabel - it works , also it works if i install app by using command react-native run-android --variant=release
This is due to already installed debuged mode app in your device. Uninstall previously installed debug apk from your devive then install new released apk.

JS and React Native: node.js doesn't accept 'import' keyword

I'm a beginner in using JavaScript and the framework React Native.
I have the task to program a mobile web app with React Native with another student from my class. He started to build an app, which is build without any problems on his Android Emulator. He sent me his App and node.js (my editor is JetBrains WebStorm, my partner uses the same editor) does not recognize my import react.
But when I start the app in my command line with react-native run-android everything function and I can see the app, but my problem is
that I can't run it from my editor.
I have already install those in my command line:
C:\Users\Hang>npm install -g yarn
C:\Users\Hang>npm install -g react-native-cli
What did I forget to install ?
Here is a screenshot of the message that I get when I try to run the App:
You are using Node.js Run configuration to start your application, but Node.js doesn't support ES6 modules natively (thus the Syntax erroron import), and, of course, it doesn't support react-native cli options, so running node index.android.js as you do won't start your app in android emulator. You should have used React Native run configuration instead. Please see https://blog.jetbrains.com/webstorm/2016/12/developing-mobile-apps-with-react-native-in-webstorm/, Running and debugging the app section
You have to install the react Native CLI for your IDE (webstorm)
you will find It here

Categories

Resources