'webpack compilation error in the cypress test runner unexpected token
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?
Solution 1:[1]
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
{}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
