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

Bad module not found error from webpack #14711

Closed
Timer opened this issue Jun 30, 2020 · 4 comments · Fixed by #15860
Closed

Bad module not found error from webpack #14711

Timer opened this issue Jun 30, 2020 · 4 comments · Fixed by #15860
Assignees
Milestone

Comments

@Timer
Copy link
Member

Timer commented Jun 30, 2020

Bug report

Describe the bug

image

To Reproduce

import a from “b”;

Expected behavior

A more clear message that says you're trying to import b and that's the problem. This message alludes to a being the problem.


Useful flag:

image

@Timer Timer added this to the backlog milestone Jun 30, 2020
@Timer Timer added the good first issue Easy to fix issues, good for newcomers label Jun 30, 2020
@sambarrowclough
Copy link

sambarrowclough commented Jul 11, 2020

Hi. Is it okay if I tackle this?

@Timer
Copy link
Member Author

Timer commented Jul 13, 2020

Sure!

@sambarrowclough
Copy link

What do you think about this?

image

The annoying bit would be that the /packages dir will be included in the module trace, giving it some extra fluff. I could blindly replace all lines that contain packages but it doesn't seem like a good idea in case someone uses this structure :/

The tips are just some common scenarios I came across on StackOverflow that could be useful for troubleshooting

@Timer Timer added point: 3 and removed good first issue Easy to fix issues, good for newcomers labels Aug 5, 2020
@Timer Timer modified the milestones: backlog, iteration 6 Aug 5, 2020
@kodiakhq kodiakhq bot closed this as completed in #15860 Aug 5, 2020
kodiakhq bot pushed a commit that referenced this issue Aug 5, 2020
Adds handling for module not found errors exposed by webpack. This ensures you see the actual stack line and code instead of a short message where you don't know where to go.

### Previous

<img width="794" alt="Screen Shot 2020-08-05 at 18 02 06" src="https://user-images.githubusercontent.com/6324199/89435935-d5542c00-d745-11ea-9ca7-c67f553364f9.png">


### New

<img width="769" alt="Screen Shot 2020-08-05 at 14 20 23" src="https://user-images.githubusercontent.com/6324199/89412212-f6595480-d726-11ea-81a3-398ab7036338.png">


Fixes #14711
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants