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

Webpack Can't resolve 'deepmerge' in node_modules #183

Open
NA-Dev opened this issue Dec 12, 2019 · 5 comments
Open

Webpack Can't resolve 'deepmerge' in node_modules #183

NA-Dev opened this issue Dec 12, 2019 · 5 comments

Comments

@NA-Dev
Copy link

NA-Dev commented Dec 12, 2019

I am on the latest version of deepmerge. I have read old issues on this and tried all the different import and require syntaxes suggested. No luck. Guess I will go back to the old version that was working.

@TehShrike
Copy link
Owner

mmk

Can you provide any helpful information?

What version are you using? (npm ls deepmerge)

What version of Webpack?

What is the last version of deepmerge that Webpack is able to resolve in your app?

Can you reproduce the issue in a small example repository?

@sveyret
Copy link

sveyret commented Jun 6, 2020

I also faced this problem again. From what I see, the problem most probably comes from Webpack. I am using version 4.2.2 of deepmerge, and this did not change. But I updated the version of Webpack from 4.41.6 to 4.43.0.

@sveyret
Copy link

sveyret commented Jun 6, 2020

After some short investigations, I found this which may be the cause of this “new” problem.

@phil-w
Copy link

phil-w commented Jun 11, 2020

Same problem with webpack 5, can't work out what it is yet, lots of google entries, none of them work. I don't really care about the politics, I just need to get past this error.

Is there an alternative package to deepmerge I can use - it doesn't matter to me, I just need the functionality, not the TS/JS details.

I "fixed" it by simply putting the source module into my repo and importing it that way, which works fine. One weird thing is that I have another Webpack 5 beta with precisely the same version of "deepmerge" in it, and that imports fine. Ah well, time to move on.

@sveyret
Copy link

sveyret commented Jun 11, 2020

In my project, I ended modifying my import to:

import type * as DeepMergeType from 'deepmerge'
const deepMerge: typeof DeepMergeType = require('deepmerge')

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

No branches or pull requests

4 participants