Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

getting syntax error in protractor on windows, see stacktrace #4791

Closed
ravi005e opened this issue Apr 28, 2018 · 12 comments
Closed

getting syntax error in protractor on windows, see stacktrace #4791

ravi005e opened this issue Apr 28, 2018 · 12 comments

Comments

@ravi005e
Copy link

ravi005e commented Apr 28, 2018

.\node_modules\.bin\protractor:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .js] (.\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at Object.<anonymous> (.\node_modules\babel-cli\lib\_babel-node.js:154:22)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@IgorSasovets
Copy link
Contributor

Hi, @ravi005e ! Please provide more details about your issue (executed commands, etc.).

@wswebcreation
Copy link
Contributor

@ravi005e
This is an error in your own script. Please check for syntax errors. I'm going to close this for now because we only use this issue list for issues with Protractor itself.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow
(use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!

@IgorSasovets
Copy link
Contributor

@wswebcreation , thanks that payed attention to this issue!

@ravi005e
Copy link
Author

Microsoft Windows [Version 10.0.17134.48]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\git\protractor-starter>node ./node_modules/.bin/protractor -v
C:\Users\git\protractor-starter\node_modules.bin\protractor:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^

SyntaxError: missing ) after argument list
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

here is package jason
{
"name": "protractor-starter",
"version": "0.0.6",
"description": "protractor-starter end-to-end tests setup also for non angular application",
"main": "index.js",
"repository": {
"url": "https://github.com/marcelmokos/protractor-starter.git",
"type": "git"
},
"bugs": {
"url": "https://github.com/marcelmokos/protractor-starter/issues"
},
"keywords": [
"protractor",
"starter",
"page object pattern",
"testing",
"end to end testing"
],
"author": "Marcel Mokoš",
"license": "MIT",
"scripts": {
"start": "yarn run test",
"pretest": "yarn install",
"test": "yarn run protractor --",
"test:multiple": "yarn run test -- --capabilities.shardTestFiles=true --capabilities.maxInstances=3",
"protractor": "node_modules/.bin/protractor protractor-conf.js"
},
"dependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.1",
"chromedriver": "^2.38.2",
"jasmine-spec-reporter": "^4.2.1",
"node-fetch": "^2.1.2",
"protractor": "^5.3.1"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-async-await": "^0.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-protractor": "^1.40.0"
}
}

please help

@wswebcreation
Copy link
Contributor

@ravi005e

You have a syntax error, see the stacktrace. These questions are also better suited for Stackoverflow in stead of here.

@ravi005e
Copy link
Author

it is coming from protractor api, correct. need to address here

@IgorSasovets
Copy link
Contributor

@ravi005e , try to run this example, but using

node .\node_modules\protractor\bin\protractor config.js

command (from root folder) and provide feedback about results.

@ravi005e
Copy link
Author

ravi005e commented May 24, 2018 via email

@IgorSasovets
Copy link
Contributor

@ravi005e , run

node .\node_modules\protractor\bin\webdriver-manager update

command from project root folder and then restart tests.

@ravi005e
Copy link
Author

ravi005e commented May 25, 2018 via email

@wswebcreation
Copy link
Contributor

wswebcreation commented May 25, 2018

@IgorSasovets

Yes, tnx for the support

@IgorSasovets
Copy link
Contributor

@wswebcreation, I'm happy that this issue fixed)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants