-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Current behavior
Hi Cypress Support Team,
I am writing to report a critical issue I've encountered after updating to Cypress version 15.13.0. My test suite, which was working perfectly on version 14.4.0, now fails to run due to a Webpack compilation error.
Problem Summary:
When Cypress attempts to compile the test files, it fails with a Webpack Compilation Error. The core of the problem seems to be that the Webpack preprocessor in this version of Cypress cannot handle Node.js built-in modules that are imported with the node: prefix (e.g., import fs from 'node:fs').
Error Log:
Here is the specific error message:
Error: Webpack Compilation Error
Module build failed: UnhandledSchemeError: Reading from "node:events" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme).
...
Module build failed: UnhandledSchemeError: Reading from "node:path" is not handled by plugins (Unhandled scheme).
...
Module build failed: UnhandledSchemeError: Reading from "node:util" is not handled by plugins (Unhandled scheme).
...
Image:
Analysis:
This appears to be a regression or a breaking change in how Cypress 15.13.0 bundles test dependencies. The issue is triggered by dependencies within node_modules that use the modern node: prefix for imports, which is standard in recent Node.js versions. The version of Webpack (or its configuration) bundled with Cypress 15.13.0 does not seem to have the necessary resolver or plugin to handle this scheme, causing the build to fail.
I also encountered a separate runtime error, TypeError: inherits is not a function, originating from the browser-stdout package, which might be a downstream consequence of the incorrect bundling.
Environment Details:
Cypress Package Version: 15.13.0
Cypress Binary Version: 15.13.0
Operating System: Windows (win32)
Bundled Node Version: 22.19.0
Since this issue does not occur in version 14.4.0, it strongly suggests a change between these versions is the cause. This bug prevents us from upgrading to the latest version of Cypress.
Could you please investigate this matter?
Thank you for your time and support.
Best regards, Isaque Quadros
Desired behavior
When I install the version before, exemple npm install cypress@14.4.1 --force,
Sucess in my process testing:
Image:
Test code to reproduce
Executed:
npm uninstall cypress
rmdir /s /q %LOCALAPPDATA%\Cypress
npm cache clean --force
npm install cypress@14.4.1 --force
npx cypress install --force
Installing Cypress (version: 14.4.1)
✔ Downloaded Cypress
✔ Unzipped Cypress
✔ Finished Installation C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\14.4.1
You can now open Cypress by running one of the following, depending on your package manager:
- npx cypress open
- yarn cypress open
- pnpm cypress open
https://on.cypress.io/opening-the-app
command:
npx cypress open
imagem:
Cypress Version
15.13.0
Debug Logs
Error: Webpack Compilation Error Module build failed: UnhandledSchemeError: Reading from "node:events" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs.
Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs.
Module build failed: UnhandledSchemeError: Reading from "node:path" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs.
Module build failed: UnhandledSchemeError: Reading from "node:util" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs. at Watching.handle [as handler] (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules@packages\server\node_modules@cypress\webpack-preprocessor\dist\index.js:296:23) at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Watching.js:317:9 at Hook.eval [as callAsync] (eval at create (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\tapable\lib\Hook.js:18:14) at Watching._done (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Watching.js:314:28) at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Watching.js:229:21 at Compiler.emitRecords (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:1046:4) at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Watching.js:205:22 at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:1009:14 at Hook.eval [as callAsync] (eval at create (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\tapable\lib\Hook.js:18:14) at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:1006:27 at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\neo-async\async.js:2818:7 at done (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\neo-async\async.js:3522:9) at alreadyWritten (C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:811:8) at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:922:17 at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules\graceful-fs\graceful-fs.js:123:16 at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:123:16 at C:\Users\isaque.quadros\AppData\Local\Cypress\Cache\15.13.0\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)Other
No response