bahmutov / cypress-book-todomvc

Cypress tests inside README that update the screenshots
https://glebbahmutov.com/cypress-book-todomvc/
11 stars 2 forks source link

Unable To Run Cypress Tests On Windows 10 #31

Open TheProgrammerJerry opened 3 years ago

TheProgrammerJerry commented 3 years ago

When I try to run the code using "run npm dev" and then select either of the 2 Cypress Test Cases, they both report the following error:

Error: Can't walk dependency graph: Cannot find module 'C:UsersAAAACodescypress-book-todomvc-master ode_modules@cypress iddlesrcindex.js' from 'C:\Users\AAAA\AppData\Local\Temp\6ab1ec78-5de5-41d9-a9a7-91814d8ecd1d' required by C:\Users\AAAA\AppData\Local\Temp\6ab1ec78-5de5-41d9-a9a7-91814d8ecd1d\social-image.md.js (both give errors) Note: I replaced my user path with AAAA.

Steps to reproduce: 1) On a Windows 10 Machine, Running Node 14 or 13 (tried both), open the repository files in Visual Studio 2017 (also tried IntelliJ). 2) Run npm install (also tried removing packagelock first) 3) Enter: npm run dev (this runs the web server and cypress. I also tried running the commands separately) 4) Once cypress opens, click on either of the tests 5) The error will appear shortly after

bahmutov commented 3 years ago

Interesting, well, can you trace where the problem is originating by enabling the DEBUG variable

Probably the best would be to set the environment variable DEBUG to value cypress-book,cypress-markdown-preprocessor to see the verbose log messages from both modules.

TheProgrammerJerry commented 3 years ago

I enabled debugging to the two modules you mentioned, which did not provide any additional details to the issue. I have not been able to pin-point the issue. I have tried another machine running Windows 10 and got the same results.

What sticks out to me is the module path in the error C:UsersAAAACodescypress-book-todomvc-master ode_modules@cypress iddlesrcindex.js

The odd symbol and no slashes in the path, is that to be expected? And, is there any other modules that you would like me to try enabling debug on?

bahmutov commented 3 years ago

It is very weird. At this point I can only ask you to look at the source code of the module to see what is going on and track the problem down

Sent from my iPhone

On Feb 16, 2021, at 19:09, TheProgrammerJerry notifications@github.com wrote:

 I enabled debugging to the two modules you mentioned, which did not provide any additional details to the issue. I have not been able to pin-point the issue. I have tried another machine running Windows 10 and got the same results.

What sticks out to me is the module path in the error C:UsersAAAACodescypress-book-todomvc-master ode_modules@cypress iddlesrcindex.js

The odd symbol and no slashes in the path, is that to be expected? And, is there any other modules that you would like me to try enabling debug on?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

TheProgrammerJerry commented 3 years ago

Unfortunately, I spent several hours debugging it and could not find the issue other than being able to consistently reproduce it on numerous machines.

Update: I spent a few more hours looking into it and hit a brick wall. I tried to put debug statements in various modules and came up short. I have no idea why it won't work on Windows. To try and regain some sanity, I tried it in Ubuntu and it worked first try.

So, something is off with running it on Windows, I just don't know what. To try and get the modules down further in debugging, I tried running the Cypress Markdown Preprocessor which gave the same results (same error as above).

TheProgrammerJerry commented 3 years ago

Anyone have any ideas on the next steps to debug this? I am finding the amount of dependencies that could be causing it to prove to be challenging to debug. There is almost this jump-point of where the file path goes from being proper-form to bad-form but I cannot determine where.