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

fix(loader): experimentalLoader with node@18 #21106

Merged
merged 2 commits into from
Feb 22, 2023

Commits on Feb 22, 2023

  1. fix(loader): experimentalLoader with node@18

    There is currently a bug when running `node@18.14.2` when running with experimentalLoader
    
    ```
    TypeError: The URL must be of scheme file
      at new NodeError (node:internal/errors:399:5)
      at Object.fileURLToPath (node:internal/url:1492:11)
      at resolve (./node_modules/@playwright/test/lib/experimentalLoader.js:39:48)
      at nextResolve (node:internal/modules/esm/loader:163:22)
      at ESMLoader.resolve (node:internal/modules/esm/loader:838:24)
      at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:7)
      at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:21)
    ```
    
    This came from my test `vrt.spec.ts` which had a non package import inside of it
    
    ```ts
    import fs from "node:fs/promises"
    ```
    
    The test run failed due to node imports not returning fileUrls when resolved.
    Nowell Strite committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    7ab2468 View commit details
    Browse the repository at this point in the history
  2. PR feedback

    Nowell Strite committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    5f28b4a View commit details
    Browse the repository at this point in the history