Skip to content

Cannot find module defs using typeRoots #682

@shusson

Description

@shusson

If you have a config like this:

{
  "compilerOptions": {
    ...
    "typeRoots" : ["./typings"]
  }

And a directory structure like this:

-- tsconfig.json
  -- typings
    -- index.d.ts

ts-node will not be able to find the module defs in index.d.ts

ts-node will work if you have something like:

-- tsconfig.json
  -- typings
    -- <library_name>
      -- index.d.ts

Typescript will work with either setup.

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