Skip to content

[BUG] Could not resolve "C:\repo\framework\utils" in file C:\repo\tests\test.ts. #11552

@creage

Description

@creage

Context:

  • Playwright Version: 1.18.0
  • Operating System: Windows
  • Node.js version: 16.13.1
  • Browser: All

Code Snippet

I have my tsconfig.json defined like this

{
    "compilerOptions": {
        "target": "ESNext",
        "moduleResolution": "Node",
        "resolveJsonModule": true,
        "esModuleInterop": true,
        "baseUrl": ".",
        "paths": {
            "@/*": [
                "./*"
            ]
        }
    }
}

Describe the bug
Then I have a folder /framework, and a folder /tests.

In the /framework folder I have /framework/utils.ts.

In the /tests folder I have /tests/test.ts:

import utils from '@/framework/utils';
...

Trying to run my test warns me with message

Could not resolve "C:\repo\framework\utils" in file C:\repo\tests\test.ts.

But test runs fine, and completes green. So, it is just a falsy warning message (from babel-plugin-module-resolver I believe).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions