Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webdriverio Error on Window10 basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") ^^^^^^^ SyntaxError: missing ) after argument list

When i try to run npm run then i got below error I am using below configuration :
webdriverio v4.14.4

node v8.5

npm v5.3

Windows 10

below is my config file

"scripts":{
"web": "node node_modules/.bin/wdio ./test/config/suite.web.conf.js",
}

below error :

> $ npm run web
>  [email protected] web >C:\Users\user\Downloads\webdriverioFramework\webdriverioFramework 
>ENV=preprod node node_modules/.bin/wdio ./test/config/suite.web.conf.js

C:\Users\user\Downloads\webdriverioFramework\webdriverioFramework\node_modules\.bin\wdio:2
> basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
>           ^^^^^^^
> 
> SyntaxError: missing ) after argument list
>     at createScript (vm.js:74:10)
>     at Object.runInThisContext (vm.js:116:10)
>     at Module._compile (module.js:588:28)
>     at Object.Module._extensions..js (module.js:635:10)
>     at Module.load (module.js:545:32)
>     at tryModuleLoad (module.js:508:12)
>     at Function.Module._load (module.js:500:3)
>     at Function.Module.runMain (module.js:665:10)
>     at startup (bootstrap_node.js:201:16)
>     at bootstrap_node.js:626:3 npm ERR! code ELIFECYCLE npm ERR! errno 1
like image 946
Afsar Ali Avatar asked Apr 19 '19 07:04

Afsar Ali


1 Answers

I got the solution for this error :

i had to remove only "node" from the config file .

new config looks like :

"scripts":{
"web": "node_modules/.bin/wdio ./test/config/suite.web.conf.js",
}

just removed "node" from the script .

like image 198
Afsar Ali Avatar answered Nov 15 '22 02:11

Afsar Ali