Skip to content

npm run flint: check-deps cannot run on Windows (posix path.resolve on drive-letter paths) #42988

Closed

Description

Steps

On Windows (Node 24, current main), after npm ci && npm run build:

npm run check-deps

Actual

Checking DEPS for html-reporter
Disallowed import ../../C:/Dev/playwright/packages/playwright-core/types/types in ../../C:/Dev/playwright/packages/playwright-core/types/structs.d.ts
Disallowed import ../../C:/Dev/playwright/packages/playwright-core/types/protocol in ../../C:/Dev/playwright/packages/playwright-core/types/types.d.ts
...

It fails on the first package, so nothing after html-reporter (including playwright-core) is checked, and flint exits non-zero.

Cause

utils/check_deps.js uses require('path').posix for everything, including path.resolve(path.join(__dirname, '..', 'packages')). On Windows __dirname is C:\...; posix resolve treats it as relative and prefixes the cwd, so every computed path becomes <cwd>/C:\...-shaped and no import matches a DEPS entry.

Expected

check-deps works on Windows, or flint documents that it does not. Running it for a single package (my workaround: a copy of the script with the other innerCheckDeps calls removed) is what caught a real DEPS.list violation in my change, so I'd like it to work here.

I'd like to send the fix (normalize the root to forward slashes once, keep the rest posix). Could someone assign this to me?

Note

npm run doc also fails locally when firefox/webkit are not installed (getBrowserVersions launches all three); that one is expected, only mentioning it so nobody confuses the two.

Activity

  1. dgozman commented on Sep 30, 2026

    @dgozman
    Collaborator

    Gabriel dos Anjos (@dosxnjos) Assigned, please go ahead with a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions