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

Unformatted errors when running pkg watch #222

Open
bjoerge opened this issue Sep 4, 2023 · 0 comments
Open

Unformatted errors when running pkg watch #222

bjoerge opened this issue Sep 4, 2023 · 0 comments
Labels

Comments

@bjoerge
Copy link
Member

bjoerge commented Sep 4, 2023

Currently, errors that may happen during doExtract when running pkg watch --strict (not sure if --strict matters) are currently logged as-is without any sort of formatting, which leads to output like this:

[error] DtsError: encountered 2 errors when extracting types
    at doExtract (./node_modules/@sanity/pkg-utils/dist/_chunks/index-c12a2784.cjs:2156:2098) {
  messages: [
    ExtractorMessage {
      category: 'Extractor',
      messageId: 'ae-forgotten-export',
      text: '(…)',
      sourceFilePath: './src/types.ts',
      sourceFileLine: 23,
      sourceFileColumn: 1,
      properties: {},
      _handled: true,
      _logLevel: 'error'
    },
    ExtractorMessage {
      category: 'Extractor',
      messageId: 'ae-forgotten-export',
      text: '(…)',
      sourceFilePath: './types.ts',
      sourceFileLine: 139,
      sourceFileColumn: 1,
      properties: {},
      _handled: true,
      _logLevel: 'error'
    }
  ]
}

ERROR: "pkg:watch" exited with 1.

Not a super big deal, but it would be nice if these errors could be formatted the same way as they are when error occurs during pkg build:

[error] 1638ms
[error] encountered 2 errors when extracting types


types.ts:23:1 - error ae-forgotten-export
(The error message)

types.ts:139:1 - error ae-forgotten-export
(The error message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants