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

Cannot find module 'kind-of' #4

Closed
wenshan opened this issue Nov 29, 2016 · 8 comments
Closed

Cannot find module 'kind-of' #4

wenshan opened this issue Nov 29, 2016 · 8 comments

Comments

@wenshan
Copy link

wenshan commented Nov 29, 2016

Cannot find module 'kind-of'

@doowb
Copy link
Collaborator

doowb commented Nov 29, 2016

Please be more specific. Show some code to reproduce the error and the error stack.

Also, make sure to clear the npm cache and reinstall since this is usually the issue:

# delete node_modules folder
$ rm -fr node_modules
# clear npm cache
$ npm cache clear
# install `merge-deep`
$ npm install merge-deep

@jonschlinkert
Copy link
Owner

yeah this is definitely a caching issue. just delete node_modules and reinstall everything. closing since the issue is not related to this project

@ulken
Copy link

ulken commented Oct 20, 2020

Still get hit by this. Coming from a clean install. I've cleared all caches, removed node_modules and re-installed everything. Multiple times.

Don't have time to look into this right now, but if I were to guess, I think it could have something to do with either different versions of kind-of being depended upon (I already had version 6.x installed and this package depends upon 3.x) or some incompatibility with CommonJS/ESM modules.

For the time being, I've resorted to use another library. A shame, cause I liked how minimal this was.

@ulken
Copy link

ulken commented Oct 20, 2020

If the assumption above is correct, merging #13 and #14 might do the trick.

@isneezy
Copy link

isneezy commented Nov 27, 2020

Removing nodemodules didn't solve the problem.

@kumavis
Copy link

kumavis commented Jan 27, 2021

Also encountered this problem with fresh node_modules

bundling with webpack against merge-deep@3.0.2

cc @jonschlinkert

@doowb
Copy link
Collaborator

doowb commented Jan 27, 2021

bundling with webpack

This is the first time anyone mentioned webpack...

However, no one has provided any more information (e.g. the code using merge-deep, their bundler config, an error stack trace, etc...)

@fingerartur
Copy link

fingerartur commented Aug 20, 2021

I ran into this problem with create-react-app + yarn workspaces + typescript (TS config: "esModuleInterop": true, "allowSyntheticDefaultImports": true)

I tried importing like this

import merge from 'merge-deep'
// and also
const merge = require('merge-deep')

... on the other hand when I used it in node.js + typescript and imprted like so

const merge = require('merge-deep')

it worked fine

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

7 participants