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

Added module to ignored node modules list #5798

Merged
merged 1 commit into from
Jan 16, 2019
Merged

Conversation

dotansimha
Copy link
Contributor

@dotansimha dotansimha commented Nov 14, 2018

Some dependencies (or dependencies of dependencies) might try to load module module, and it breaks CRA apps (such as https://github.com/sindresorhus/resolve-from) because Webpack can't find this module.

This PR adds module to list of empty node modules.

@Timer
Copy link
Contributor

Timer commented Nov 14, 2018

How is resolve-from used in the Browser? Can you provide a more concrete example please?

@dotansimha
Copy link
Contributor Author

@Timer , it's not actually, it's a dependency of dependency.
For example, graphql-import package can be loaded on client side, which loads import-from, which loads resolve-from, and the module is loaded.

@jberney
Copy link

jberney commented Dec 8, 2018

Another library using module is source-map-support. My CRA project is using source-map-support because:

info Reasons this module exists
   - Hoisted from "react-scripts#terser-webpack-plugin#terser#source-map-support"
   - Hoisted from "react-scripts#jest#jest-cli#jest-runner#source-map-support"
...
=> Found "babel-register#source-map-support@0.4.18"
info This module exists because "babel-core#babel-register" depends on it.

It looks like source-map-support put the attempt to load module in a try/catch, so it doesn't break my CRA app. But it does cause a console warning both on load and after every hot reload, which can be sort of noisy.

@stale
Copy link

stale bot commented Jan 12, 2019

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jan 12, 2019
@dotansimha
Copy link
Contributor Author

@Timer ? someone?

@stale stale bot removed the stale label Jan 13, 2019
@mrmckeb
Copy link
Contributor

mrmckeb commented Jan 13, 2019

@dotansimha The CI issues should be resolved now, can you please rebase? Then I can merge this in. Thanks!

@dotansimha
Copy link
Contributor Author

@mrmckeb done :)

@mrmckeb mrmckeb merged commit 34e5029 into facebook:master Jan 16, 2019
@mrmckeb
Copy link
Contributor

mrmckeb commented Jan 16, 2019

OK, I've merged this in. It's very low risk, but I'll keep a lookout for any potentially related new issues.

@Timer Timer added this to the 2.1.4 milestone Jan 16, 2019
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants