-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
TypeError: path must be a string to res.sendFile #26059
Comments
@Xhuljano-Racaku Sorry to hear you're having issues, but we will need a bit more info in order to help diagnose your issue. Could you explain where you're encountering that error and attach the logging output of your failing test? Is it possible to share a reproduction of the error? It's much more likely we can identify and assist with your issue if a reproduction case is supplied. |
I am not able to attach a screenshot, but I will copy and paste everything in here.. This error occur when I run e2e testing. Once I type that command thats what happens (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: app.spec.js Oops...we found an error preparing this test file: e2e\src\integration\app.spec.js The error was: TypeError: path must be a string to res.sendFile This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
Fix the error in your code and re-run your tests. ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ (Video)
==================================================================================================== (Run Finished)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ |
@Xhuljano-Racaku It appears you have an issue with the preprocessor stage - are you using a preprocessor or other plugins? If you temporarily remove them does the problem go away? If so you should verify you have them correctly configured - there are older issues in the repo that suggest potential fixes |
Yes, you are right. When I removed the pluginsFile from cypress.json it works. I have tried so many things but it looks I can't figure it out. I already checked potentail fixes and still can't get it work. This is how my index.js looks:
|
I was able to figure it out. Thanks for your help. You can close this issue |
@Xhuljano-Racaku I assume the file you embedded above is your |
Current behavior
I am trying to write my first e2e test in angular but I am getting this error TypeError: path must be a string to res.sendFile, so I am not able to run the test. How can I solve this issue?
My cypress.json looks like this
The structure of the folders is
| e2e > tsconfig.json |cypress.json
Please any help would be appreciated
Debug logs
No response
Cypress Version
9.1.0
Node version
14.18.16
Package Manager
npm
Package Manager Version
1.3.2691
Operating system
Windows
Operating System Version
21H2
Other
No response
The text was updated successfully, but these errors were encountered: