Skip to content

Unable to find module with tsconfig-paths #1269

Closed

Description

@edaqa-uncountable

ts-node is unable to find a module and I don't know how to further debug the issue.

I use a command-line like this:

node_modules/.bin/ts-node --project ./tsconfig.json -r tsconfig-paths/register test/js/sample.ts

Where there is a paths section in the tsconfig.ts file

  "compilerOptions": {
    "baseUrl": "js",
    "paths": {
      "some_base/*": ["base/*"],
    }

And then I try to import via it:

// this fails
import { checkConstraints } from 'some_base/comp'

// this works (not using path aliases)
import { checkConstraints } from 'base/comp'

I was unable to find an option in ts-node or tsconfig-paths that would let me diagnose the issue further.

Activity

  1. cspotcode commented on Mar 9, 2021

    @cspotcode
    Collaborator

    Check this out:
    #1263

  2. locked and limited conversation to collaborators on Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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