我試圖從這裏正式文件 https://github.com/cucumber/cucumber-js/blob/master/docs/nodejs_example.md無法啓動第一個例子中的黃瓜+ JavaScript的
- 我用過Windows 7x64位推出第一個例子,Node.js的6.11
- 我嘗試下面的命令和得到了相同的結果
*
node_modules/cucumber/bin/cucumber.js autotests/cucumber-test/features/documentation.feature
node_modules\cucumber\bin\cucumber.js autotests\cucumber-test\features\documentation.feature
cucumber autotests\cucumber-test\features\documentation.feature
cucumber-js autotests\cucumber-test\features\documentation.feature
*
,我得到了以下錯誤
cucumber.js:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at getDefinitions (<path>\node_modules\cucumber\lib\cucumber\cli\profiles_loader.js:8:23)
我也試圖降級到1.3.3黃瓜,但它並不能幫助
我只有cucumber.js文件進入node_modules \ cucumber \ bin –