Skip to content

Cannot find module kind-of #18

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
kumavis opened this issue Jan 27, 2021 · 11 comments
Open

Cannot find module kind-of #18

kumavis opened this issue Jan 27, 2021 · 11 comments

Comments

@kumavis
Copy link

kumavis commented Jan 27, 2021

encountered this problem with fresh node_modules

bundling with webpack against merge-deep@3.0.3

relevant issue with recent reports #4

@kumavis
Copy link
Author

kumavis commented Jan 27, 2021

looks like webpack@4.37.0 doesn't know how to parse clone-deep@0.2.4

WARNING in /home/xyz/Development/lavamoat/node_modules/clone-deep/utils.js 7:34-41
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ /home/xyz/Development/lavamoat/node_modules/clone-deep/index.js
 @ ../core/node_modules/merge-deep/index.js
 @ ../core/src/mergeConfig.js
 @ ./src/App.js
 @ ./src/index.js

@kumavis
Copy link
Author

kumavis commented Jan 27, 2021

due to this lazy cache mechanism https://npmfs.com/package/clone-deep/0.2.4/utils.js#L10

@kumavis
Copy link
Author

kumavis commented Jan 27, 2021

relevant PRs #12 #14 #9

@kumavis
Copy link
Author

kumavis commented Jan 27, 2021

@doowb more info over here 👍

@doowb
Copy link
Collaborator

doowb commented Jan 27, 2021

@kumavis :) I just saw these... thank you for more information.

Have you tried unlazy-loader? It might be useful until we update the dependencies using lazy-cache.

@kumavis
Copy link
Author

kumavis commented Jan 27, 2021

fwiw just tested the latest versions and they worked with the current merge-deep source for my basic json merging needs

  • arr-union@3.1.0
  • clone-deep@4.0.1
  • kind-of@6.0.3

not sure what breaking changes bubble up but could always just udpate them all and cut a major 🤷

@doowb
Copy link
Collaborator

doowb commented Jan 27, 2021

Yes... I believe the path will be to update the dependencies and publish a new major version.

Most of the breaking changes have to do with Node.js compatibility... this is currently set at >=0.10.0, and will need to be bumped to at least what clone-deep is using (>=6) because of the use of const.

@gtsigner
Copy link

gtsigner commented Apr 16, 2021

also same error invoke when using puppeteer-extra-plugin
image

it still dosen't work after using unlazy-loader

@kurohoan
Copy link

Can anyone help me with this problem?
I'm stuck.

@mycoin
Copy link

mycoin commented Jul 19, 2021

USE assign-deep (https://www.npmjs.com/package/assign-deep) instand !

@JasonHoku
Copy link

Hello!

If you're using webpack and electron I found a fix for this by making sure to include any merge-deep dependencies as an external and to declare the node_modules path relative to your package.json in your package.json as an 'extraResource'.

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

No branches or pull requests

6 participants