-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Unexpected token ... for cypress run #2516
Comments
Same problem. |
@srinivasrk the syntax error mentioned |
@bkucera how do I get around it though ? |
@bkucera @srinivasrk I am having the same issue here. Did you find a workaround? I tried running the tests with the option I am trying to preprocess the here are the contents of my {
"plugins": ["transform-es2015-modules-commonjs", "transform-object-rest-spread"]
} I have also installed both plugins for babel, like so: "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-register": "^6.26.0", |
nevermind, just rewrote the few ES6 syntaxes to ES5 and it worked out of the box with Cypress |
@christian-fei ah okay I will try replacing my ES-6 features as well. Hope it works out. Thanks for letting me know. |
Duplicate of #2069 |
Same on Solus Linux
Despite being avaiable on system
Debug
2018-11-24T10:26:40.602Z cypress:cli cli starts with arguments ["/home/ed8/.config/fnm/bin/node","/home/ed8/projects/lsf/node_modules/.bin/cypress","run","--browser","chromium","--spec","placeholders.specs.js"]
2018-11-24T10:26:40.604Z cypress:cli NODE_OPTIONS is not set
2018-11-24T10:26:40.604Z cypress:cli program parsing arguments
2018-11-24T10:26:40.605Z cypress:cli running Cypress
2018-11-24T10:26:40.646Z cypress:cli parsed cli options { spec: 'placeholders.specs.js', browser: 'chromium' }
2018-11-24T10:26:40.647Z cypress:cli verifying Cypress app
2018-11-24T10:26:40.648Z cypress:cli checking environment variables
2018-11-24T10:26:40.662Z cypress:cli checking if executable exists /home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress
2018-11-24T10:26:40.664Z cypress:cli Binary is executable? : true
2018-11-24T10:26:40.664Z cypress:cli binaryDir is /home/ed8/.cache/Cypress/3.1.2/Cypress
2018-11-24T10:26:40.665Z cypress:cli Reading binary package.json from: /home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/package.json
2018-11-24T10:26:40.667Z cypress:cli Found binary version 3.1.2 installed in: /home/ed8/.cache/Cypress/3.1.2/Cypress
2018-11-24T10:26:40.668Z cypress:cli { verified: true }
2018-11-24T10:26:40.668Z cypress:cli is Verified ? true
2018-11-24T10:26:40.668Z cypress:cli processing run options
2018-11-24T10:26:40.668Z cypress:cli --key is not set, looking up environment variable CYPRESS_RECORD_KEY
2018-11-24T10:26:40.668Z cypress:cli run to spawn.start args ["--run-project","/home/ed8/projects/lsf","--spec","placeholders.specs.js","--browser","chromium"]
2018-11-24T10:26:40.668Z cypress:cli needs XVFB? false
2018-11-24T10:26:40.672Z cypress:cli spawning Cypress with executable: /home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress
2018-11-24T10:26:40.672Z cypress:cli spawn forcing env overrides { FORCE_COLOR: '0', DEBUG_COLORS: '0', FORCE_STDIN_TTY: '1', FORCE_STDOUT_TTY: '0', FORCE_STDERR_TTY: '0' }
2018-11-24T10:26:40.672Z cypress:cli spawn args [ '--run-project', '/home/ed8/projects/lsf', '--spec', 'placeholders.specs.js', '--browser', 'chromium', '--cwd', '/home/ed8/projects/lsf' ] { dev: undefined, detached: false, stdio: 'inherit' }
Sat, 24 Nov 2018 10:26:40 GMT cypress:ts Running without ts-node hook in environment "production"
Sat, 24 Nov 2018 10:26:41 GMT cypress:server:cypress starting cypress with argv [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress', '--run-project', '/home/ed8/projects/lsf', '--spec', 'placeholders.specs.js', '--browser', 'chromium', '--cwd', '/home/ed8/projects/lsf' ]
Sat, 24 Nov 2018 10:26:41 GMT cypress:server:args argv array: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress', '--run-project', '/home/ed8/projects/lsf', '--spec', 'placeholders.specs.js', '--browser', 'chromium', '--cwd', '/home/ed8/projects/lsf' ]
Sat, 24 Nov 2018 10:26:41 GMT cypress:server:args argv parsed: { _: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress' ], runProject: '/home/ed8/projects/lsf', spec: 'placeholders.specs.js', browser: 'chromium', cwd: '/home/ed8/projects/lsf' }
Sat, 24 Nov 2018 10:26:41 GMT cypress:server:args argv options: { _: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress' ], runProject: '/home/ed8/projects/lsf', spec: [ '/home/ed8/projects/lsf/placeholders.specs.js' ], browser: 'chromium', cwd: '/home/ed8/projects/lsf', config: {}, projectRoot: '/home/ed8/projects/lsf', run: true }
Sat, 24 Nov 2018 10:26:41 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production
Sat, 24 Nov 2018 10:26:41 GMT cypress:server:cypress starting in mode run
Sat, 24 Nov 2018 10:26:42 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production/browsers
Sat, 24 Nov 2018 10:26:42 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production
Sat, 24 Nov 2018 10:26:42 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production/cache
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers queuing timer id 1 after 500 ms
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers child received timer id 1
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers child sending timer id 1
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers clearing timer id 1 from queue { '1': { args: [], ms: 500, cb: [Function] } }
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:run run mode ready with options { _: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress' ], runProject: '/home/ed8/projects/lsf', spec: [ '/home/ed8/projects/lsf/placeholders.specs.js' ], browser: 'chromium', cwd: '/home/ed8/projects/lsf', config: {}, projectRoot: '/home/ed8/projects/lsf', run: true }
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:project Project created /home/ed8/projects/lsf
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher checking one browser chrome
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking up chrome on linux platform
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking using command "google-chrome --version"
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c google-chrome --version
/bin/sh: google-chrome: command not found
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher browser chrome not installed Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher browser chromium not installed Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher browser canary not installed Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher browser chrome not installed Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher browser chromium not installed Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher browser canary not installed Browser: 'chromium' was not found on your system. Available browsers found are: electron Browser: 'chromium' was not found on your system. Available browsers found are: electron He is looking for
Symlink fail
I can't run
|
Hi, my application is written in typescript and I am getting this same error with the spread syntax. I can't run cypress chrome at work because of some security policies, and now I can't run my test suite using electron without changing my syntax. Is there any workaround for this yet? |
Same here, a project in typescript |
Same issue here with typescript project. The odd thing is that the first test fails with the error |
This is a known issue explained in #2069. Please check there for updates/workarounds |
Current behavior:
When I run
cypress run
I get an error that saysThere are other test cases with similar structure which works fine
Desired behavior:
All test cases to pass !
Steps to reproduce:
I have nested describe blocks and when I run
npm run cy:open
and run all specs from there there seems to be no problem.When I run the command line utility the error appears.
Versions
"cypress": "^3.1.0"
Using nodejs
The text was updated successfully, but these errors were encountered: