Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Possibly incorrect module resolution? #54

Open
@jasonkuhrt

Description

In a Vitepress project I am seeing the following behaviour.

Given a code block like:

CleanShot 2024年09月06日 at 18 08 57@2x

And given this file system in current working directory:

node_modules/
 bar/
 index.d.ts (contains: export declare const foo: number)
bar/
 index.d.ts (contains: export declare const foo2: number)

Then twoslash attempts to resolve the bar import to from ./bar instead of ./node_modules/bar.

CleanShot 2024年09月06日 at 18 11 08@2x

If I rm -rf bar then node_modules/bar is used.

I think it might be an error that an import for bar would pick up ./bar before first looking for node_modules/bar.

When I run this in GitHub Actions, this problem does not happen. I am not sure why yet.

Metadata

Metadata

Assignees

No one assigned

    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

        AltStyle によって変換されたページ (->オリジナル) /