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

deno check doesn't output source file information in stack trace when it can't open library file #27477

Open
dandv opened this issue Dec 27, 2024 · 0 comments

Comments

@dandv
Copy link

dandv commented Dec 27, 2024

I'm running deno check and getting a stack trace that only includes Deno internals, not my source file(s):

$ deno check main.ts
Check file:///home/dandv/deno-bugs/main.ts
error: Uncaught Error: Unable to load /home/dandv/.cache/deno/npm/registry.npmjs.org/@anthropic-ai/sdk/0.33.1/src/resources/messages.d.ts: No such file or directory (os error 2)
    at Object.getSourceFile (ext:deno_tsc/99_main_compiler.js:621:28)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126789:23)
    at findSourceFile (ext:deno_tsc/00_typescript.js:126705:20)
    at processImportedModules (ext:deno_tsc/00_typescript.js:127105:11)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126854:7)
    at findSourceFile (ext:deno_tsc/00_typescript.js:126705:20)
    at processImportedModules (ext:deno_tsc/00_typescript.js:127105:11)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126854:7)
    at findSourceFile (ext:deno_tsc/00_typescript.js:126705:20)
    at ext:deno_tsc/00_typescript.js:126654:22

I would expect to see main.ts and lib.ts at the top of (actually instead of) that stack trace.

main.ts

import { message } from './lib.ts';

console.log(message);

lib.ts

import type { Message } from '@anthropic-ai/sdk/src/resources/messages';

export const message: Message = 'foo';  // this is wrong, Message is an object

Reproduction

  1. git clone https://github.com/dandv/deno-bug-check-stack-trace-omits-source-file
  2. deno check main.ts

Version: Deno 2.1.4

Related

#27472

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

1 participant