Syantax Error in a JavaScript login Controller file - javascript

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.

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.

Session Error While Using WebdriverIO with Appium on Android Device

I cloned the repo https://github.com/Schveitzer/webdriverio-appium-cucumber-boilerplate and tried to run the tests.
I consistently get the following error.
2022-06-16T22:51:13.157Z ERROR #wdio/runner: Error: Failed to create session.
Unable to connect to "http://localhost:4723/", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
Steps:
Clone the repo
Download the latest version of the demo app which Android-NativeDemoApp-0.4.0.apk. The one in the repo does not work.
Update the capabilities.
Yarn Install/Yarn Run
I made some changes. However, was not able to resolve the issue. Any suggestions to resolve the issue?
From the error, it seems that appium server is not running. One reason could be that the repo has an old version of packages and you might have installed the latest version of appium.
One thing you could try is to remove the this line from the config file and try the below.
Start the appium server using the command appium on terminal
Run your tests and see if it works
Otherwise, you have to upgrade all the packages in the repo. but this also means you may have to change something in the code.
Your appium server is likely not running, from package.json I can see that the appium-service that is supposed to get it up is missing. You have two options:
install the #wdio/appium-service package, and appium should run automatically or
start the appium server yourself, either from the terminal with appium -a 127.0.0.1 -p 4723 or launch the appium desktop app

Terminal stops running commands after switching Node's version with nvm

Hope to find you guys well =).
So, my problem is that I'm trying to initialize a Gatsby project and after some trouble I discovered that for some boiler plate "starter" template to work I would have to install an older version of Node. Since I already have nvm installed, I just downloaded the version I wanted and switched via terminal.
I verified it with node -v and it threw me the version I wanted. The thing is that when I try to run 'gatsby develop' it says "gatsby: command not found".
And that if I close and open my terminal again it resets the version. Is this supposed to behave like that?
By the way, you can already tell that I'm new at this so any information or guidelines will be of extreme helpfulness.
You can try doing yarn develop if using yarn. Or npx develop if using npx

Javascript version mismatch for Tabris framework

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

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.

Categories

Resources