Reputation: 93
I have this Error: Webpack Compilation Error, after trying to import a component into my cypress test spec
am on React version 17.0.0 and React-dom v17.0.0
What might be causing this?
here is the image of the error
Upvotes: 1
Views: 1243
Reputation: 126
You can see your webpack logs by running cypress when [documenting][1] in debug mode [1]: https://docs.cypress.io/guides/guides/debugging#Print-DEBUG-logs
Mac/Linux
DEBUG=cypress:* cypress run
Windows
set DEBUG=cypress:*
cypress run
Everything you do in Cypress is logged in,
one of which is cypress:webpack
, which can give you the full message.
And Also please try, adding an empty .babelrc file to the cypress roo directory allowed me to work around this issue.
cypress/.babelrc
{}
Upvotes: 1