react-sketch icon indicating copy to clipboard operation
react-sketch copied to clipboard

Module not found Error with react-sketch as dependency

Open emmanuelle opened this issue 6 years ago • 10 comments
trafficstars

Hi, I'm using react-sketch as a dependency in my JS project (thanks for a really cool tool :-)). I tried updating to version 0.5.1, and now webpack crashes with the following error.

ERROR in ./node_modules/react-sketch/dist/index.js
Module not found: Error: Can't resolve 'jsdom' in '/home/emma/sandbox/dash-canvas/node_modules/react-sketch/dist'
 @ ./node_modules/react-sketch/dist/index.js 1:85-101
 @ ./src/lib/components/DashCanvas.react.js
 @ ./src/lib/index.js

If I add jsdom to the list of devdependencies in the package.json file, then there a lots of new "Module not found" error (for 'tls', 'fs', 'net'...).

I didn't have the problem with version 0.4.4.

Any ideas about what's going on? I'm not a Javascript expert, so any help will be very welcome...

emmanuelle avatar Mar 17 '19 22:03 emmanuelle

This issue might be related to #61.

emmanuelle avatar Mar 17 '19 22:03 emmanuelle

Other missing deps.

ERROR in /projects/src/suite/node_modules/tunnel-agent/index.js
Module not found: Error: Can't resolve 'tls' in '/projects/src/suite/node_modules/tunnel-agent'
 @ /projects/src/suite/node_modules/tunnel-agent/index.js 4:10-24
 @ /projects/src/suite/node_modules/request/lib/tunnel.js
 @ /projects/src/suite/node_modules/request/request.js
 @ /projects/src/suite/node_modules/request/index.js
 @ /projects/src/suite/node_modules/request-promise-native/lib/rp.js
 @ /projects/src/suite/node_modules/jsdom/lib/api.js
 @ /projects/src/suite/node_modules/react-sketch/dist/index.js

richburdon avatar Mar 18 '19 23:03 richburdon

Thank you @richburdon !

I have the impression that PR #57 tries to solve this issue. @tbolis are you considering merging #57?

emmanuelle avatar Mar 19 '19 22:03 emmanuelle

@emmanuelle did you manage to fix this problem? I have the same and can't seem to solve it

michaelcukier avatar Mar 21 '19 18:03 michaelcukier

@michaelcukier unfortunately not; one temporary solution would be to merge #57 on your branch and see if the problem is solved when importing locally the package.

emmanuelle avatar Mar 23 '19 16:03 emmanuelle

Thanks for the library, it looks great and want to use it. Any update regarding the same issue ? or any idea how much time it will take to merge release with new version ?

Thanks.

dhawalearchana avatar Apr 18 '19 13:04 dhawalearchana

@tbolis did you have the time to look at #57?

emmanuelle avatar Apr 22 '19 20:04 emmanuelle

Any updates to this issue so far?

AliakseiMat avatar Feb 01 '20 23:02 AliakseiMat

+1

emptycrown avatar Feb 04 '20 23:02 emptycrown

Try https://www.npmjs.com/package/react-sketch-4.0

AAYUSHAIRAN avatar Jun 27 '23 04:06 AAYUSHAIRAN