konvajs / react-konva

React + Canvas = Love. JavaScript library for drawing complex canvas graphics using React.
https://konvajs.github.io/docs/react/
MIT License
5.79k stars 257 forks source link

Unable to resolve some modules: "canvas" and "jsdom" #33

Closed hoangdo94 closed 8 years ago

hoangdo94 commented 8 years ago

Hello there,

After installing react-konva I tried to run my application. However, I got this message:

Unable to resolve some modules:

"canvas" in /Users///node_modules/konva/konva.js (web.browser) "jsdom" in /Users///node_modules/konva/konva.js (web.browser)

It can still render the shapes normally. I'm wondering how I can ommit this warning??

Thanks

lavrton commented 8 years ago

What are you using for bundling you code? "canvas" and "jsdom" are dependencies for use in NodeJS environment. In they should be ignored for browser build. It is defined in package.json in browser section. https://github.com/konvajs/konva/blob/master/package.json Browserify and webpack understand that configuration.

hoangdo94 commented 8 years ago

I use it in my Meteor app, installed it by: meteor npm install react-konva --save

I got that message each time i run my application by running meteor command

However, it still works normally.

lavrton commented 8 years ago

@hoangdo94 For now I am not sure how to resolve it. This warning come from konva.js source. Probably you can just ignore it: https://github.com/meteor/meteor/issues/6601#issuecomment-202999523

hoangdo94 commented 8 years ago

@lavrton thanks so much for your information and sorry for late reply. I will close the issue now xD. I thought it's just a warning too