Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: No Support for Windows #55

Closed
1 task done
Lukada-taiya opened this issue Jan 17, 2024 · 5 comments · Fixed by #56
Closed
1 task done

Bug: No Support for Windows #55

Lukada-taiya opened this issue Jan 17, 2024 · 5 comments · Fixed by #56
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Lukada-taiya
Copy link

Current result, describe the bug

Does cy-shadow-report support windows?

I am testing the project on my windows 10 machine using the demo branch. After generating and merging the files, I ran

cy-shadow-report

but I am getting this error

node:internal/errors:497
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:406:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:216:11)
at defaultLoad (node:internal/modules/esm/load:118:3)
at ModuleLoader.load (node:internal/modules/esm/loader:396:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:56)
at new ModuleJob (node:internal/modules/esm/module_job:65:26)
at #createModuleJob (node:internal/modules/esm/loader:290:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:248:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:229:17)
at async ModuleLoader.import (node:internal/modules/esm/loader:315:23) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

Expected behavior

Work as intended and pass data to google sheets

Steps to reproduce

Precondition:

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Screenshots or screen recordings

No response

Browsers

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Lukada-taiya Lukada-taiya added the bug Something isn't working label Jan 17, 2024
@github-actions github-actions bot added the needs triage Label for identifying issues requiring initial review or classification label Jan 17, 2024
@petermsouzajr petermsouzajr added help wanted Extra attention is needed and removed needs triage Label for identifying issues requiring initial review or classification labels Jan 17, 2024
@petermsouzajr
Copy link
Owner

thanks for reporting this @Lukada-taiya this issue could be related to #34 . feel free to use the take command, found in the CONTRIBUTING doc, https://github.com/petermsouzajr/cy-shadow-report/blob/main/CONTRIBUTING.md#claiming-an-issue

@Lukada-taiya
Copy link
Author

Ok. Sure
.take

Copy link

Thanks for taking this issue! Let us know if you have any questions!

@petermsouzajr
Copy link
Owner

@Lukada-taiya I found this handy bit of code that i have yet to implement or test. Looks to me like it's meant to create a universally accepted filepathURL. Posting here in case it saved you some time researching.

import { fileURLToPath, pathToFileURL } from 'url';

// ... [rest of the existing code] ...

// Convert the file path to a URL
const configUrl = pathToFileURL(configPath).href;

// Now import using the URL
const shadowConfig = await import(configUrl);
const shadowConfigDetails = shadowConfig.default;

@Lukada-taiya
Copy link
Author

Thanks for that. I will look into it.

Lukada-taiya added a commit to Lukada-taiya/cy-shadow-report that referenced this issue Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants