-
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
cypress open not working #30925
Comments
Hi @MartinLednarLedo. Thank you for opening an issue. I have created a repository with a basic reproduction but I am unable to reproduce. Are you able to help me fill in the blanks? |
Hi @AtofStryker thank you for quick response. So to provide more details about the setup, which is not IMO ordinary:
What is different from your repository?
import { defineConfig } from "cypress";
export default defineConfig({
e2e: {},
});
/** @type {import('vite').UserConfig} */
/// <reference types="vitest/config" />
import path from "path";
import { defineConfig } from "vite";
//** PLUGINS **/ //
import vue from "@vitejs/plugin-vue";
import liveReload from "vite-plugin-live-reload";
import checker from "vite-plugin-checker";
export default defineConfig({
plugins: [
vue(),
liveReload(["**/*.ctp", "**/*.php"]),
checker({
typescript: true,
vueTsc: true,
overlay: true,
enableBuild: false,
}),
],
root: "./",
publicDir: "public",
appType: "mpa",
build: {
manifest: true,
outDir: "webroot", // Output directory for built files
emptyOutDir: false,
rollupOptions: {
input: {
...getImportScssFiles("resources/css"),
...getJsFiles("resources/js"),
},
output: {
entryFileNames: nameAssets,
assetFileNames: nameAssets,
},
},
},
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
},
},
},
server: {
port: 3000,
},
resolve: {
alias: {
PATH_ALIASES
},
},
test: { // Vitest config
globals: true,
environment: "jsdom",
include: ["**/*.spec.ts"],
setupFiles: ["./tests/unit/vitest-setup.ts"],
},
});
{
"extends": ["@tsconfig/node22/tsconfig.json", "@vue/tsconfig/tsconfig.dom.json"],
"compilerOptions": {
"baseUrl": ".",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"allowJs": true,
"checkJs": false,
"strict": true,
"skipLibCheck": true,
"noImplicitThis": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"resolveJsonModule": true,
"jsx": "preserve",
"paths": {
ALIASES
}
},
"exclude": ["./dist", "./bin", "./vendor/**/*", "./webroot", "**/*.js", "./node_modules"]
}
{
"extends": ["./tsconfig.base.json"],
"compilerOptions": {
"baseUrl": ".",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"types": ["node", "vite/client"]
},
"include": ["**/*.ts", "**/*.vue", "vite-env.d.ts", "global.d.ts", "vue-shim.d.ts"]
} Just for the test i created new cakePHP app and installed cypress. It seems that cake is causing the cypress to download so long but cypress opened successfully so I think the error has to be caused by some of the files mentioned above. Hope this helped to clarify some things. If you need anything else to help you dedug the issue, let my know. |
@AtofStryker Hi, so another update, I figured out what is causing the error. It's in tsconfig.json:
I also tried leaving the extends and comment out everything in tsconfig.base.json, but the error preserved. So the Cypress opens up but on the page where I select type of tests, the option for e2e tests is showing as import { defineConfig } from "cypress";
import vitePreprocessor from "cypress-vite";
export default defineConfig({
e2e: {
setupNodeEvents(on) {
on("file:preprocessor", vitePreprocessor());
},
},
}); Do you have any suggestion for the tsconfig extends problem? Thank you in advance |
@MartinLednarLedo I was able to reproduce with the code you provided us. Thank you for doing that. I have updated https://github.com/AtofStryker/cypress-issue-30925 with the code to reproduce. I am going to investigate shortly and see if I can figure out what is going on. |
@AtofStryker Thank you very much! |
still investigating but this does look to be happening as well in Cypress 13. |
Current behavior
Hi,
I have migrated my older project to Vite 6 and I wanted to try Cypress for e2e tests. After installing via
npm i cypress --save-dev
and runningnpx cypress open
the cypress window is opened I see the loading spinner but in terminal i getThese are my dependencies
When i tried fresh installation in my Nuxt3 apps, they are using Vite v5.4.11 the Cypress works fine. That's why I tried this version also in my project, but it didn't help.
Also I dont know if it's relevant, but in my project the installation of cypress takes signifcantly more time than in nuxt projects.
Could you suggest what am I doing wrong? Thank you very much for any help
Desired behavior
No response
Test code to reproduce
Don't have any tests and the unfortunately repo is private.
Cypress Version
14.0.0
Node version
22.7.0
Operating System
MacOS 14.7.1
Debug Logs
Other
No response
The text was updated successfully, but these errors were encountered: