tbolis / react-sketch

Sketch Tool for React-based applications, backed up by FabricJS
http://tbolis.github.io/showcase/react-sketch/
MIT License
683 stars 230 forks source link

Module not found Error with react-sketch as dependency #66

Open emmanuelle opened 5 years ago

emmanuelle commented 5 years ago

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 commented 5 years ago

This issue might be related to #61.

richburdon commented 5 years ago

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
emmanuelle commented 5 years ago

Thank you @richburdon !

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

michaelcukier commented 5 years ago

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

emmanuelle commented 5 years ago

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

dhawalearchana commented 5 years ago

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.

emmanuelle commented 5 years ago

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

AliakseiMat commented 4 years ago

Any updates to this issue so far?

emptycrown commented 4 years ago

+1

AAYUSHAIRAN commented 1 year ago

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