merge-deep icon indicating copy to clipboard operation
merge-deep copied to clipboard

Cannot find module kind-of

Open kumavis opened this issue 4 years ago • 11 comments
trafficstars

encountered this problem with fresh node_modules

bundling with webpack against [email protected]

relevant issue with recent reports https://github.com/jonschlinkert/merge-deep/issues/4

kumavis avatar Jan 27 '21 15:01 kumavis

looks like [email protected] doesn't know how to parse [email protected]

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 avatar Jan 27 '21 15:01 kumavis

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

kumavis avatar Jan 27 '21 15:01 kumavis

relevant PRs https://github.com/jonschlinkert/merge-deep/pull/12 https://github.com/jonschlinkert/merge-deep/pull/14 https://github.com/jonschlinkert/merge-deep/pull/9

kumavis avatar Jan 27 '21 15:01 kumavis

@doowb more info over here :+1:

kumavis avatar Jan 27 '21 15:01 kumavis

@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.

doowb avatar Jan 27 '21 15:01 doowb

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

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

kumavis avatar Jan 27 '21 15:01 kumavis

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.

doowb avatar Jan 27 '21 16:01 doowb

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

it still dosen't work after using unlazy-loader

gtsigner avatar Apr 16 '21 08:04 gtsigner

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

kurohoan avatar Jun 28 '21 00:06 kurohoan

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

mycoin avatar Jul 19 '21 17:07 mycoin

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'.

JasonHoku avatar Dec 13 '22 14:12 JasonHoku