From fcf7c13e7af0ec1c24859b1beef6e7e482600c45 Mon Sep 17 00:00:00 2001 From: Wataru Ashihara Date: Wed, 7 Jan 2026 17:35:59 +0900 Subject: [PATCH] fix(examples): fix test in examples/with-cypress/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following error by bumping cypress to the latest. ```console $ pnpm component:headless > @ component:headless /src/with-cypress > cypress run --component Your configFile threw an error from: cypress.config.js We stopped running your tests because your config file crashed. TypeError: webpackModule.init is not a function at sourceNextWebpack (/home/wsh/.cache/Cypress/12.3.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-dev-server/dist/helpers/nextHandler.js:252:19) at sourceNextWebpackDeps (/home/wsh/.cache/Cypress/12.3.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-dev-server/dist/helpers/nextHandler.js:212:21) at nextHandler (/home/wsh/.cache/Cypress/12.3.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-dev-server/dist/helpers/nextHandler.js:18:74) at async getPreset (/home/wsh/.cache/Cypress/12.3.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-dev-server/dist/devServer.js:74:20) at async devServer.create (/home/wsh/.cache/Cypress/12.3.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-dev-server/dist/devServer.js:93:61) at async /home/wsh/.cache/Cypress/12.3.0/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-dev-server/dist/devServer.js:25:24  ELIFECYCLE  Command failed with exit code 1. ``` --- examples/with-cypress/cypress/support/component.ts | 2 +- examples/with-cypress/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/with-cypress/cypress/support/component.ts b/examples/with-cypress/cypress/support/component.ts index 9d7b637b976151..86d29cb951ae01 100644 --- a/examples/with-cypress/cypress/support/component.ts +++ b/examples/with-cypress/cypress/support/component.ts @@ -20,7 +20,7 @@ import "./commands"; // Alternatively you can use CommonJS syntax: // require('./commands') -import { mount } from "cypress/react18"; +import { mount } from "cypress/react"; // Augment the Cypress namespace to include type definitions for // your custom command. diff --git a/examples/with-cypress/package.json b/examples/with-cypress/package.json index b7d3a04804812a..ef59138fb15931 100644 --- a/examples/with-cypress/package.json +++ b/examples/with-cypress/package.json @@ -18,7 +18,7 @@ "@types/node": "18.0.6", "@types/react": "18.2.8", "@types/react-dom": "18.0.6", - "cypress": "12.3.0", + "cypress": "15.8.2", "start-server-and-test": "1.15.2", "typescript": "4.7.4" }