Skip to content

"npx auto info" failing with "Failed to compile TypeScript: Debug Failure" using auto.config.ts file  #2248

Open
@danawoodman

Description

Describe the bug

Getting the following error when running npx auto info:

TypeScriptCompileError: Failed to compile TypeScript: Debug Failure. False expression: Non-string value passed to 	`ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature.

To Reproduce

Setup auto in an existing project via the instructions in the docs, then create a TypeScript config file:

auto.config.ts:

import { AutoRc } from "auto";

export default function rc(): AutoRc {
	return {};
}

Using .auto with this works:

{}

Expected behavior

Should output info about auto

Screenshots

Environment information:

"auto" version: v10.37.4
"git"  version: v2.32.0 (Apple Git-132)
"node" version: v17.9.1

Additional context

Full stack trace:

TypeScriptCompileError: Failed to compile TypeScript: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Function.TypeScriptCompileError.fromError (/path/to/my/repo/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/Errors/TypeScriptCompileError.ts:20:12)
    at /path/to/my/repo/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/index.ts:14:34
    at Generator.next (<anonymous>)
    at /path/to/my/repo/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/path/to/my/repo/node_modules/tslib/tslib.js:114:16)
    at loader (/path/to/my/repo/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/index.ts:6:51)
    at Explorer.loadFileContent (/path/to/my/repo/node_modules/cosmiconfig/src/Explorer.ts:81:32)
    at Explorer.createCosmiconfigResult (/path/to/my/repo/node_modules/cosmiconfig/src/Explorer.ts:89:36)
    at Explorer.loadSearchPlace (/path/to/my/repo/node_modules/cosmiconfig/src/Explorer.ts:65:31)

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions