bahmutov / cypress-await

Cypress async await magic 🪄
https://glebbahmutov.com/blog/use-async-await-in-cypress-specs/
18 stars 1 forks source link

Error: Can't walk dependency graph: Cannot find module #32

Open rk508501 opened 1 year ago

rk508501 commented 1 year ago

Getting error below upon installation of the plugin:

Error: Can't walk dependency graph: Cannot find module './commands' from '/private/var/folders/tm/l34rvdd51w7fkc13jcsxqy3h0000gn/T/1ae96f0f-32e0-4948-90aa-cc50ffda2eae/e2e.js.js' required by /private/var/folders/tm/l34rvdd51w7fkc13jcsxqy3h0000gn/T/1ae96f0f-32e0-4948-90aa-cc50ffda2eae/e2e.js.js at /Users/garu/Downloads/Automation/node_modules/resolve/lib/async.js:167:35 at load (/Users/garu/Downloads/Automation/node_modules/resolve/lib/async.js:186:43) at onex (/Users/garu/Downloads/Automation/node_modules/resolve/lib/async.js:211:17) at /Users/garu/Downloads/Automation/node_modules/resolve/lib/async.js:24:69 at callback (/Users/garu/Library/Caches/Cypress/13.3.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/polyfills.js:299:20) at callback (/Users/garu/Library/Caches/Cypress/13.3.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/polyfills.js:299:20) at FSReqCallback.oncomplete (node:fs:210:21)

My Package.json { "name": "automation", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "npx cypress open" }, "author": "", "license": "ISC", "dependencies": { "cypress": "^13.3.2", "dayjs": "^1.11.9" }, "devDependencies": { "cypress-await": "^1.4.4" } }

My config: `const { defineConfig } = require("cypress"); // https://github.com/bahmutov/cypress-await const cyAwaitPreprocessor = require('cypress-await/src/preprocessor')

module.exports = defineConfig({ e2e: { testIsolation:false, setupNodeEvents(on, config) { // implement node event listeners here on('file:preprocessor', cyAwaitPreprocessor()) }, }, });`

My Spec: describe("Test", ()=>{ it('shows the number of projects', async () => { await cy.visit('https://github.com/bahmutov/cypress-await') const n = await cy.get('#repository-container-header').invoke('text') cy.log(n) }) })

rkumarkundu commented 1 year ago

same issue in my system

Error: Can't walk dependency graph: Cannot find module './commands' from 'C:\Users\RANJIT~1\AppData\Local\Temp\99b485ac-7b73-4f63-af21-889e127d18ef\e2e.js.js' required by C:\Users\RANJIT~1\AppData\Local\Temp\99b485ac-7b73-4f63-af21-889e127d18ef\e2e.js.js at C:\project\RnD\node_modules\resolve\lib\async.js:167:35 at load (C:\project\RnD\node_modules\resolve\lib\async.js:186:43) at onex (C:\project\RnD\node_modules\resolve\lib\async.js:211:17) at C:\project\RnD\node_modules\resolve\lib\async.js:24:69 at callback (C:\Users\RanjitKundu\AppData\Local\Cypress\Cache\13.3.3\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\polyfills.js:299:20) at callback (C:\Users\RanjitKundu\AppData\Local\Cypress\Cache\13.3.3\Cypress\resources\app\node_modules\@packages\server\node_modules\graceful-fs\polyfills.js:299:20) at FSReqCallback.oncomplete (node:fs:210:21)

SuperJessiK commented 1 year ago

I am also encountering the same problem. Can you please give an idea of when it will be fixed?

bahmutov commented 1 year ago

I'm sorry I do not have time to work on this, but if someone opens a pull request with an update, I will be happy to review and merge it

SuperJessiK commented 1 year ago

Thanks for your reply. That's quite a shame. But if you do merge some code, please let me know. TIA Yael

On Sun, Nov 19, 2023 at 5:15 PM Gleb Bahmutov @.***> wrote:

I'm sorry I do not have time to work on this, but if someone opens a pull request with an update, I will be happy to review and merge it

— Reply to this email directly, view it on GitHub https://github.com/bahmutov/cypress-await/issues/32#issuecomment-1817884372, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEDP2RVNVHE6YRZF3BCWBFTYFIO7TAVCNFSM6AAAAAA6IHIG4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXHA4DIMZXGI . You are receiving this because you commented.Message ID: @.***>

vesper8 commented 10 months ago

Same here.. why is this suddenly happening? Was this plugin working fine and then Cypress got updated and now it's not working anymore?

J7mbo commented 3 months ago

This is not resolved since October so I understand that the library is not being maintained any more, does anyone have an alternative, a fix, or want to build one?

bahmutov commented 3 months ago

Please, if this is a blocker for you, provide a reproducible simple example plus open a pull request to fix this.