react / react/metro

[FR] add debug output to module resolution

Open
#590 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.6k
Forks
696
Avg merge
8m
Merged PRs (30d)
7

Description

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Module resolution failures are opaque

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

What is the expected behavior?

Using a module like debug to make it easier to see what paths/cwd are being used for resolution attempts. It would make it much easier to see why metro is getting confused with relative path imports

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.

"react-native": "0.63.2"
"metro-react-native-babel-preset": "^0.59.0",

node -v
v14.10.1

npm -v
6.14.8

Mac OS 10.15.6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Begin by locating Metro's module-resolution implementation and reviewing how resolution failures currently surface, including the paths and cwd involved; done means users can enable debug output and understand why a relative import failed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.