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

Appearance settings

Incorrect module resolution #10572

Copy link
Copy link
@mhevery

Description

@mhevery
Issue body actions

TypeScript Version: Version 2.1.0-dev.20160826

Code
https://github.com/mhevery/ts-resolution-bug

Expected behavior:

Actual behavior:

The project tries to compile a index.ts which imports @types/node. Internally @types/node has http module. TS then assumes that http module is http.ts in the current project and compiles it. I think that is incorrect behavior.

It is strange that a file in node_modules can control which files get compiled in my project. I think that once trace resolution enters node_module it should not be allowed to escape out of it.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.