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

Error: Unknown option: .mode. Check out ... #15133

Closed
ivanvorona opened this issue Feb 17, 2021 · 5 comments
Closed

Error: Unknown option: .mode. Check out ... #15133

ivanvorona opened this issue Feb 17, 2021 · 5 comments

Comments

@ivanvorona
Copy link

ivanvorona commented Feb 17, 2021

Hi folks, i am trying to run cypress on my vuejs project. any *spec.js open attempts give me this error message:

Error: Webpack Compilation Error
./cypress/integration/examples/sample_spec.js
Module build failed (from C:/Users/ivan_/AppData/Local/Cypress/Cache/6.5.0/Cypress/resources/app/packages/server/node_modules/babel-loader/lib/index.js):
Error: Unknown option: .mode. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

Desired behavior

No error.

Test code to reproduce

https://dev.azure.com/olympianguru/OLYMPIAN_GURU/_git/OG_MARKETPLACE

Versions

Never worked for this project. first time tried.
Capture

@mccataldo
Copy link

@ivanvorona I found a similar issue with a comment including a possible solution.
#6755 (comment)
Give it a try and post an update here.

@mccataldo
Copy link

@ivanvorona you could also try removing the .babelrc file or compilation configs in package.json just to see if there's a difference.

@ivanvorona
Copy link
Author

Hi @mccataldo - i've removed this file: babel.config.js from my project and it fixed the issue. any idea what dependency & why it broke cypress?
will research if that config will have other impact on my project.

Thanks,
Ivan

@mccataldo
Copy link

mccataldo commented Feb 17, 2021

@ivanvorona Not sure yet. What happens if you put a new babel config in the cypress directory?

@jennifer-shehane jennifer-shehane added the stage: awaiting response Potential fix was proposed; awaiting response label Feb 18, 2021
@JessicaSachs
Copy link
Contributor

@ivanvorona I think Cypress may have an older version of babel-loader than what's supported in your application's version. In our latest 3.x release (private alpha) we rewrote this so that we do not bundle any user dependencies (babel, webpack, etc) to avoid these kinds of versioning issues.

We'll be releasing 3.x for public use on around March 15th. If you don't want to upgrade, you can pass in a webpack configuration in your plugins file where you remove the babel-loader for Cypress only.

You should probably keep your babel file when building your app for production.

I hope this helps. I'll update this issue when we release 3.x. I'm going to close this issue unless you have anything else to add.

@jennifer-shehane jennifer-shehane removed the stage: awaiting response Potential fix was proposed; awaiting response label Jun 16, 2021
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

4 participants