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

Webpack compilation error #128

Closed
tobloef opened this issue Jan 19, 2021 · 4 comments · Fixed by #129
Closed

Webpack compilation error #128

tobloef opened this issue Jan 19, 2021 · 4 comments · Fixed by #129
Assignees
Labels
bug Something isn't working

Comments

@tobloef
Copy link
Contributor

tobloef commented Jan 19, 2021

Whenever I try to run my Cypress tests on version 2.3.1, I get the webpack compilation error described below. This has already been mentioned in another issue, but I thought it best to create a separate issue for this exact bug.

yarn run v1.22.4
$ C:\Users\toblo\Code\vms\node_modules\.bin\cypress run --headless --quiet --record false

Couldn't find tsconfig.json. tsconfig-paths will be skipped

Oops...we found an error preparing this test file:

  cypress\support\index.js

The error was:

Error: Webpack Compilation Error
./node_modules/cypress-react-selector/src/reactHandler.js 124:62
Module parse failed: Unexpected token (124:62)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|             value = Cypress.$(value);
|           }
>           return cy.verifyUpcomingAssertions(value, reactOpts?.options, {
|             onRetry: resolveValue,
|           });
 @ ./node_modules/cypress-react-selector/index.js 8:4-33
 @ ./cypress/support/index.js

This occurred while Cypress was compiling and bundling your test code. This is usually caused by:

- A missing file or dependency
- A syntax error in the file or one of its dependencies

Fix the error in your code and re-run your tests.

This seems to be caused by the question mark, which is invalid JS syntax. Perhaps some TypeScript isn't being compiled on release or something? The same happens on line 238, as well as twice on line 73 of utils.js. I did a test where I replaced the question mark with something like this (reactOpts || {}).options and everything seemed to work.

Downgrading to 2.2.2 also fixed the issue.

@abhinaba-ghosh
Copy link
Owner

fix available in v2.3.2

@saravananvi358
Copy link

I have issue in my feature file
image_2021_04_22T10_55_41_507Z

@olumikey198
Copy link

olumikey198 commented Jul 6, 2021

image

Can anyone help with this please as it seems like I am having issues with my feature file but no idea what the problem is?

@abhinaba-ghosh
Copy link
Owner

hey @olumikey198 , It seems the issue with the webpack can not identify the .feature files. This is not related to this library. You can check with the gherkin/cucumber utility you are using under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants