You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> nx run my-lib:component-test
> cypress run --component
DevTools listening on ws://127.0.0.1:64154/devtools/browser/f0e26e5e-eb27-4762-91cb-efc19634bd90
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://127.0.0.1:8080/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Users\DominykasAstrauskas\repos\org\libs\my-lib\public' directory
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
Entrypoint main [big] 562 KiB = runtime.js 33.3 KiB main.js 528 KiB
chunk (runtime: runtime) cypress-support-file.css, cypress-support-file.js (cypress-support-file) 1.71 KiB (javascript) 75 bytes (css/mini-extract) [rendered]
chunk (runtime: runtime) main.js (main) (id hint: vendors) 183 KiB [initial] [rendered] reused as split chunk (cache group: defaultVendors)
chunk (runtime: runtime) runtime.js (runtime) 9.39 KiB [entry] [rendered]
chunk (runtime: runtime) spec-0.css, spec-0.js (spec-0) 1.53 KiB (javascript) 76 bytes (css/mini-extract) [rendered]
chunk (runtime: runtime) vendors-node_modules_cypress_react18_dist_cypress-react_esm-bundler_js.js (id hint: vendors) 1.02 MiB [rendered] split chunk (cache group: defaultVendors)
chunk (runtime: runtime) vendors-node_modules_react_index_js.js (id hint: vendors) 85.7 KiB [rendered] split chunk (cache group: defaultVendors)
chunk (runtime: runtime) vendors-node_modules_react_jsx-dev-runtime_js.js (id hint: vendors) 41.3 KiB [rendered] split chunk (cache group: defaultVendors)
ERROR in ./src/lib/my-lib.cy.tsx 5:0-34
Module not found: Error: Can't resolve '@my/lib2' in 'C:\<myorg>\org\libs\my-lib\src\lib'webpack compiled with 1 error (3e8662c3985d689b)No errors found.==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 13.14.2 │ │ Browser: Electron 118 (headless) │ │ Node Version: v20.9.0 (C:\Program Files\nodejs\node.exe) │ │ Specs: 1 found (my-lib.cy.tsx) │ │ Searched: **/*.cy.{js,jsx,ts,tsx} │ └────────────────────────────────────────────────────────────────────────────────────────────────┘──────────────────────────────────────────────────────────────────────────────────────────────────── Running: my-lib.cy.tsx (1 of 1) 1) An uncaught error was detected outside of a test 0 passing (255ms) 1 failing 1) An uncaught error was detected outside of a test: Error: The following error originated from your test code, not from Cypress. > Cannot find module '@my/lib2'When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.Cypress could not associate this error to any specific test.We dynamically generated a new test to display this failure. at webpackMissingModule (http://localhost:8080/__cypress/src/spec-0.js:37:50) at 823 (http://localhost:8080/__cypress/src/spec-0.js:37:133) at Function.__webpack_require__ (http://localhost:8080/__cypress/src/runtime.js:23:42) (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Tests: 1 │ │ Passing: 0 │ │ Failing: 1 │ │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 1 │ │ Video: false │ │ Duration: 0 seconds │ │ Spec Ran: my-lib.cy.tsx │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (Screenshots) - C:\<myOrg>\dist\cypress\libs\my-lib\screenshots\my-l (1280x720) ib.cy.tsx\An uncaught error was detected outside of a test (failed).png==================================================================================================== (Run Finished) Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✖ my-lib.cy.tsx 252ms 1 - 1 - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✖ 1 of 1 failed (100%) 252ms 1 - 1 - -Warning: command "cypress run --component" exited with non-zero status code——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— NX Ran target component-test for project my-lib (16s) × 1/1 failed √ 0/1 succeeded [0 read from cache]
Package Manager Version
No response
Operating System
macOS
Linux
Windows
Other (Please specify)
Additional Information
No response
The text was updated successfully, but these errors were encountered:
astrodomas
changed the title
When generating cypress component tests - monorepo local library imports are not resolved
When generating cypress component tests in nx 19.7.3 - monorepo local library imports are not resolved
Sep 17, 2024
astrodomas
changed the title
When generating cypress component tests in nx 19.7.3 - monorepo local library imports are not resolved
When generating cypress component tests in nx 19.7.3 - nx library imports are not resolved
Sep 17, 2024
Current Behavior
Just tested this on a fresh nx monorepo setup.
Expected Behavior
When importing a local monorepo library - cypress component test should resolve imports.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: