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

fix: don't change default node_modules resolution #10561

Merged
merged 1 commit into from
Jan 2, 2019
Merged

Conversation

jquense
Copy link
Contributor

@jquense jquense commented Dec 19, 2018

I feel like i fixed this before, but couldn't find anything :P

we can't do this. what happens is that module resolution always checks the root node_modules before any other node_modules, this essentially breaks any dependency that shares a root dep of a different version

/node_modules
 - lodash@v4
 - some-pkg
   - node_modules
     - lodash@v3

Given the above structure some-pkg will resolve lodash@4 not lodash@3. when there are incompatible versions like this it causes extremely hard to debug issues, because the dep tree on disk is correct.

@jquense jquense requested a review from a team as a code owner December 19, 2018 18:17
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, what we currently have doesn't make much sense.

Thanks @jquense!

@pieh pieh merged commit 201ff4b into master Jan 2, 2019
@jquense
Copy link
Contributor Author

jquense commented Jan 2, 2019

awesome, glad this didn't break anything :P

@jquense jquense deleted the jquense-patch-1 branch January 2, 2019 16:47
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants