arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io

Log where module failures occur

Open
#200 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
65
PR merge metrics
No merged PRs in 30d

Description

Currently, when `attw` fails, the error message may look something like,

> A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSResolvesToESM.md.

The immediate question that comes to mind is: *where is the import causing the failure*? It would save considerable time and add clarity to the error message if the location of the incorrect module import was logged.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported attw failure and trace how the current module-resolution error is assembled. Identify where the incorrect module import can be observed; done means the failure message logs that import location while preserving the existing diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.