intuit / intuit/auto

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

Open
#2,248 7 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.5k
Forks
221
PR merge metrics
No merged PRs in 30d

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`:

```typescript
import { AutoRc } from "auto";

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

Using `.auto` with this works:

```json
{}
```

**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 ()
at /path/to/my/repo/node_modules/tslib/tslib.js:118:75
at new Promise ()
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)

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.