Skip to content

Compilation error when using absolute paths AND sub folders #6

@mspoulsen

Description

@mspoulsen

This is almost identical to this issue: #3
However, the problem arises when using subfolders.

Here is my tsconfig.json:

"baseUrl": "./",
    "paths": {
      "@src/*": [ "src/*" ]
     }

Code to reproduce the issue:
Create a folder src/tmp. Add foo.ts and foo.test.ts

Run typed-test src/tmp/foo.test.ts

Expected behavior:
To find and run src/tmp/foo.test.ts

Actual behavior:
Error: Cannot find module '/home/morten/coding/typed-test/.typed-test-5zJQqA/src/tmp/foo'

Versions of packages used:
Typescript 2.9.2
typed-test: 6.5.0

Comments:
I tried using tsconfig-paths like this typed-test -r tsconfig-paths/register src/tmp/foo.test.ts. But it didn't make any difference.

What can I do?

Thanks 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions