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
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 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With