-
Notifications
You must be signed in to change notification settings - Fork 11
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
Long-running processes fail with Error: ENOENT: no such file or directory #33
Comments
Hi @jordanandree, thanks for reaching out. I don't think throwing error is the right way to solve this. I'll try to figure out some way for triggering a rerun when the bundle is ready. And btw, more information about the tests, configuration, etc., or perhaps a reproduction can help me through this. |
Hi, thanks for great library like this ! :) I got same error.
This file exists surely but has extention
Why and how to fix it ?
import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
import path from 'path'
export default defineConfig({
viewportWidth: 1000,
viewportHeight: 1200,
video: false,
screenshotOnRunFailure: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on) {
on('file:preprocessor', vitePreprocessor(path.resolve(__dirname, './vite.config.ts')))
},
baseUrl: 'http://localhost:8082',
},
})
|
snagasawa I am experiencing the exact same problem! I think there is an actual issue with this library but I can't seem to fix it. If anyone knows how to fix this please say |
@jordanandree @snagasawa Cypress version 10.11 seems to solve this (with Node 17). |
@jordanandree @snagasawa do you confirm that Cypress@10.11 solves this? |
@oren-legit @mammadataei |
@snagasawa same error on v11.2?! If so, could you please send me the debug output? |
I had same error, no output from debug. Then i matched versions, tsconfigs and vite configs to this example repo. after removing this piece of code from my vite.config.ts it started working. |
@MartinN3 Can you clarify in what file and what code you removed to get this working? |
This issue is automatically marked as stale because it has been open for 30 days with no activity. Remove the stale label or leave a comment, or it will be closed in 14 days. |
This issue was closed because it has been stalled for 14 days with no activity. Please feel free to open a new issue if you have any further questions. |
First off, thanks for this great library!
When setting it up for an existing cypress project, I've noticed that some files that take a while to preprocess will throw an error in the Cypress runner output window:
After a few minutes of waiting, it seems that Vite builds the file and emits an event for Cypress to rerun, which then it succeeds. I'm wondering if there are some improvements that can be made to the watcher for the preprocessor, but I'm not super familiar with Cypress file preprocessors.
Here is a rough diff for the final return of the process here. I was able to working locally that checks if the ouputFile is ready or otherwise will throw an error. Ideally it would be nice to have Cypress wait longer before outputting anything but I couldn't figure that out:
System info:
The text was updated successfully, but these errors were encountered: