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

Cypress may conflict with a user project's .babelrc file #312

Closed
paulfalgout opened this issue Nov 28, 2016 · 5 comments
Closed

Cypress may conflict with a user project's .babelrc file #312

paulfalgout opened this issue Nov 28, 2016 · 5 comments
Assignees
Labels
type: unexpected behavior User expected result, but got another
Milestone

Comments

@paulfalgout
Copy link
Contributor

Updating to 0.18 seemingly removed my node_modules folder for my project which I found odd. Attempting to run Cypress gave the error Error: Couldn't find preset "es2015" relative to directory...

After running npm i things seem to be working, but I'm not sure if this is because my library happens to include babel-preset-es2015. If my project did not rely on babel would this have worked?

This may be an oddity of the update and not a bug, but reporting in case it is a larger issue. For the moment, everything is ok on my end.

@chrisbreiding
Copy link
Contributor

Do you have a .babelrc file or have babel configured in your package.json?

@paulfalgout
Copy link
Contributor Author

I have a .babelrc in the parent directory of cypress/

@chrisbreiding
Copy link
Contributor

We added babel support in 0.18.0, but we didn't intend to auto-load your .babelrc file. It seems babel does that by default. We intend to add babel configuration support via .babelrc or cypress.json in a future release, but haven't gotten into that yet, so we haven't tested anything regarding .babelrc out. I guess we get .babelrc support for free haha.

If your project didn't have a .babelrc, it should have just worked, because we include default settings for babel so everything works out of the box. Or if your node_modules had not been removed, you of course would not have needed to npm install to get things working.

Your node_modules directory being removed is the real concerning part. That should not be happening, so we'll be looking into that.

Thanks for reporting this issue!

@paulfalgout
Copy link
Contributor Author

Cool.
I'm 100% sure that occurred in the update too.. I was running a gulp process using node_modules when I saw the cypress update. There were minutes between running gulp successfully and updating cypress and having my node_modules folder disappear :-) I don't have any other process that cleans out the dir.

@jennifer-shehane jennifer-shehane added the type: unexpected behavior User expected result, but got another label Nov 29, 2016
@brian-mann brian-mann changed the title Missing es2015 preset after v.0.18 update Cypress may conflict with a user project's .babelrc file Nov 30, 2016
@brian-mann
Copy link
Member

Fixed in 0.18.1.

@brian-mann brian-mann added this to the 0.18.1 milestone Dec 19, 2016
@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

4 participants