Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks if tsconfig.json extends from a config defined in node_modules #16

Open
tconroy opened this issue Jan 8, 2020 · 2 comments
Open

Comments

@tconroy
Copy link

tconroy commented Jan 8, 2020

My tsconfig.json contains an extends property, which targets a config that is a node_module dependency:

{
  "extends": "@org/ts-config",
  ...
}

however this breaks tscpaths:

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '<redacted>/@org/ts-config'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.exports.loadConfig (<redacted>/node_modules/tscpaths/cjs/util.js:16:12)
    at Object.exports.loadConfig (<redacted>/node_modules/tscpaths/cjs/util.js:28:38)
    at Object.<anonymous> (<redacted>/node_modules/tscpaths/cjs/index.js:37:43)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)

it seems loadConfig() in utils is not able to correctly resolve non-relative/non-absolute extends clauses.

@garretteklof
Copy link

Was there a workaround for this?

@tconroy
Copy link
Author

tconroy commented Dec 16, 2020

Hi @garretteklof -- unfortunately I was unable to find a workaround. We migrated away from tscpaths as a result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants