question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress GUI stuck with exception on console (run_plugins.js)

See original GitHub issue

Current behavior

I get this error on the console after launching Cypress after a fresh install:

~/.cache/Cypress/10.1.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_plugins.js:40    
  invoke = (eventId, args = []) => {                                                                                                     
         ^                                                          
                                                                                                                                         
SyntaxError: Unexpected token =                                                                                                          
    at new Script (vm.js:79:7)                                      
    at createScript (vm.js:251:10)                                                                                                       
    at Object.runInThisContext (vm.js:303:10)                                                                                            
    at Module._compile (internal/modules/cjs/loader.js:656:28)     
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)                                                                               
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3) 
    at Module.require (internal/modules/cjs/loader.js:636:17)       
    at require (internal/modules/cjs/helpers.js:20:18)              
    at Object.<anonymous> (~/.cache/Cypress/10.1.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_require_async_child.js:6:24)
    at Module._compile (internal/modules/cjs/loader.js:688:30)                                                                           
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)                                                                             
    at Function.Module._load (internal/modules/cjs/loader.js:529:3) 

The GUI does open, but the spinning logo is displayed. No further progress.

If I change the offending line 40 to:

  invoke(eventId, args = []) {

Then the GUI appears to be behaving normal.

Desired behavior

No response

Test code to reproduce

Run $(npm bin)/cypress open after a fresh install.

Cypress Version

10.1.0

Other

I’m running on a Linux x64 host. Node version: v10.13.0.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
tracymazelincommented, Jun 15, 2022

I see the same issue with Node v10.16.0. Cypress docs say they support Node 12 or 14 and above. Upgrading Node resolved the issue for me.

1reaction
DylanDelobelcommented, Dec 5, 2022

I have the same error on a Fresh install

/home/admin/.cache/Cypress/11.2.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_plugins.js:40
  invoke = (eventId, args = []) => {
         ^

SyntaxError: Unexpected token =
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/admin/.cache/Cypress/11.2.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_require_async_child.js:6:24)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/admin/.cache/Cypress/11.2.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/require_async_child.js:12:13

Info from cypress info

Cypress Version: 11.2.0 (stable)
System Platform: linux (Debian - 10)
System Memory: 8.37 GB free 6.55 GB

EDIT: I had to refresh env variable, was still using old npm, v10 => v16 worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
There are times when you will encounter errors or unexpected behavior with Cypress itself. In this situation, we recommend checking these support.
Read more >
Browser gets stuck when Running Cypress Command
The major problem I'm facing is that Whenever I'm trying to connect to any of the browsers from the Cypress UI. it just...
Read more >
How to handle Errors in Cypress | BrowserStack
Error handling is essential to avoid false failed tests. Learn different ways of Cypress Error and Exception Handling techniques with this ...
Read more >
Filtering app errors in Cypress tests - YouTube
This video shows how Cypress catches exceptions thrown from the application code, and how to ignore some of the errors.
Read more >
Fixing Cypress errors part 1: chromium out of memory crashes
Cypress team was kind enough to give a very detailed error message in the console and even a link pointing to a potential...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found