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

Uses actual error code to detect resolution exceptions #56

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Feb 27, 2019

The two following codes are used when a resolution fails.

  • MODULE_NOT_FOUND is used by the Node resolution when it fails for any reason
  • QUALIFIED_PATH_RESOLUTION_FAILED is thrown by PnP when an unqualified path cannot be successfully resolved to a qualified path (ie when the resolver cannot find a file that map to the specified absolute request even after trying index.js / index.node / etc alternatives).

I removed the previous check as I think MODULE_NOT_FOUND is quite old (even Node 4 has it), but I can add it back if you think that makes sense.

@TooTallNate TooTallNate merged commit ed7e626 into TooTallNate:master Feb 27, 2019
@TooTallNate
Copy link
Owner

Thank you @arcanis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants