CLI Mobile Center, "SyntaxError: Unexpected Token" when loading tests

How to resolve this error that occurs when using the Mobile Center command-line interface to download tests to Mobile Center?

SyntaxError: Unexpected token ...

enter image description here

+5
source share
1 answer

This error appears because an earlier version of Node is installed on your computer.

CLI Mobile Center mobile-center requires the latest version of Node.

Here are the steps I used to fix this error:

  • Install HomeBrew
 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 
  1. Update the latest version of Node by typing these commands into the terminal

     sudo brew uninstall node brew update brew upgrade brew cleanup brew install node sudo chown -R $(whoami) /usr/local brew link --overwrite node sudo brew postinstall node 
  2. Uninstall / reinstall mobile-center-cli to make sure you have the latest version of the CLI Mobile Center by entering these commands in the terminal

     npm uninstall -g mobile-center-cli npm install -g mobile-center-cli 
  3. Log in to the mobile center through the CLI by entering this command in your terminal *

     mobile-center login 
  4. Now you can upload your UITests to the mobile center using the CLI

     mobile-center test run uitest --app [appname] --devices [deviceID] --app-path [LocationOfYourAppOnYour] --test-series "master" --locale "en_US" --assembly-dir [FolderContainingUITestDLL] 

* If you have not created a password to log in to your mobile center, go to mobile.azure.com , mobile.azure.com out of your account if you are currently logged in, and then click "Forgot your password?". to create a password for your Mobile Center account.

Mobile Center Forgot Password

+9
source

Source: https://habr.com/ru/post/1260741/


All Articles