Skip to content

Cannot find package root when ts-jest is symlinked instead of being installed #823

@KSXGitHub

Description

@KSXGitHub

This line of code is supposed to find package root, it works when I install ts-jest using yarn or npm but doesn't when I use pnpm.

Unlike npm and yarn, pnpm wants to save disk space by symlinking packages from node_modules/.registry.npmjs.org to node_modules. This makes package root not ../../ relative to ts-jest but ../../../../ relative to ts-jest causing it to print warnings.

Suggestion

Instead of just assuming package root to be in ../../, search for package root in every ancestor directory starting with ../.

... BTW, I have a package that lists all ancestor directories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions