Skip to content

When module not found, show output of --traceResolution for that module #15845

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

Closed
ghost opened this issue May 15, 2017 · 6 comments
Closed

When module not found, show output of --traceResolution for that module #15845

ghost opened this issue May 15, 2017 · 6 comments
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@ghost
Copy link

ghost commented May 15, 2017

TypeScript Version: latest

Code

import { x } from "unresolved-module";

Expected behavior:

Shows the attempts to resolve "unresolved-module".

Actual behavior:

Just says that the module wasn't resolved.

People can always turn on --traceResolution after getting such an error, but that shows the resolution for all modules, which can be pretty long.

@mhegazy
Copy link
Contributor

mhegazy commented May 15, 2017

It is strange that you get a punch of trace messages with your errors.. i wounder if there is a way to just say trace resolutions for failed modules..

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented May 15, 2017

traceResolution: boolean | "maybe" 😄

@DanielRosenwasser DanielRosenwasser added the Suggestion An idea for TypeScript label May 15, 2017
@mhegazy
Copy link
Contributor

mhegazy commented May 15, 2017

or --traceResolution "myModule"

@aluanhaddad
Copy link
Contributor

This would be an extremely valuable and very much appreciated feature.

@mhegazy mhegazy added the Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature label Nov 9, 2017
@pirtim
Copy link

pirtim commented Mar 20, 2018

For future lurkers - rather obvious - workaround:
tsc --traceResolution | grep 'unresolved-module'

@RyanCavanaugh
Copy link
Member

Not much feedback on this, and the module resolution trace is extremely verbose and not formatted for everyday usage. I'm honestly not sure it would even help, since if the module is present, the trace doesn't explain why it didn't look in the place you expected it to be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants