Typescript: When module not found, show output of `--traceResolution` for that module

Created on 15 May 2017  路  5Comments  路  Source: microsoft/TypeScript

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.

Awaiting More Feedback Suggestion

Most helpful comment

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

All 5 comments

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..

traceResolution: boolean | "maybe" 馃槃

or --traceResolution "myModule"

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

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

Was this page helpful?
0 / 5 - 0 ratings