Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followed all steps in e2e-tests README and getting unexpected token import error #32

Open
i0na-k opened this issue Apr 24, 2018 · 0 comments

Comments

@i0na-k
Copy link

i0na-k commented Apr 24, 2018

I ran npm install
I ran docker-compose up
The./node_modules/.bin/wdio wdio.conf.js- should this be in a new terminal (this is what I did)

When running above command in new terminal window, I get this output:

ERROR: Unexpected token import
chrome
/user
(function (exports, require, module, __filename, __dirname) { import { defineSupportCode } from 'cucumber';
                                                              ^^^^^^

Syntax    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at loader (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Module._load (module.js:497:3)
    at Function.hookedLoader [as _load] (/Users/user/Downloads/e2e-tests/node_modules/mockery/mockery.js:111:12)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:246:17
    at Array.forEach (<anonymous>)
    at CucumberAdapter.loadSpecFiles (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:237:34)
    at CucumberAdapter._callee$ (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:137:38)
    at tryCatch (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/node_modules/regenerator-runtime/runtime.js:65:40)

Wrote xunit report "WDIO.xunit.chrome.0-0.xml" to [./report/].
MAC2930:e2e-tests user$ ./node_modules/.bin/wdio wdio.conf.js
ERROR: Unexpected token import
chrome
/Users/user/Downloads/e2e-tests/step_definitions/smoke_steps.js:1
(function (exports, require, module, __filename, __dirname) { import { defineSupportCode } from 'cucumber';
                                                              ^^^^^^

Syntax    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at loader (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Module._load (module.js:497:3)
    at Function.hookedLoader [as _load] (/Users/user/Downloads/e2e-tests/node_modules/mockery/mockery.js:111:12)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:246:17
    at Array.forEach (<anonymous>)
    at CucumberAdapter.loadSpecFiles (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:237:34)
    at CucumberAdapter._callee$ (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:137:38)
    at tryCatch (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/node_modules/regenerator-runtime/runtime.js:65:40)

Wrote xunit report "WDIO.xunit.chrome.0-0.xml" to [./report/].

I removed the brackets from import {defineSUpportCode} from 'cucumber' to no avail.

@i0na-k i0na-k changed the title Followed all steps in README and getting unexpected token import error Followed all steps in e2e-tests README and getting unexpected token import error Apr 24, 2018
@i0na-k i0na-k closed this as completed Jul 12, 2019
@i0na-k i0na-k reopened this Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant