Comments (5)
I have the same issue
from react-konva.
As Jest is currently not supported yet; And don't want to raise a new ticket for this. In my use case the test won't start at all because of the following error:
TypeError: Konva._nodeCanvas is not a constructor
at Object.createCanvasElement (node_modules/konva/konva.js:749:11)
at getDevicePixelRatio (node_modules/konva/konva.js:1250:29)
at Object.<anonymous>.Konva.SceneCanvas.init (node_modules/konva/konva.js:1291:48)
at Object.<anonymous>.Konva.SceneCanvas.Object.<anonymous>.Konva.Canvas (node_modules/konva/konva.js:1283:10)
at new Object.<anonymous>.Konva.SceneCanvas (node_modules/konva/konva.js:1430:18)
at Object.<anonymous>.Konva.Stage._buildDOM (node_modules/konva/konva.js:10784:27)
at Object.<anonymous>.Konva.Stage.___init (node_modules/konva/konva.js:10094:12)
at new Object.<anonymous>.Konva.Stage (node_modules/konva/konva.js:10085:10)
at Stage.componentDidMount (node_modules/react-konva/lib/index.js:107:19)
at commitLifeCycles (node_modules/react-dom/cjs/react-dom.development.js:8770:24)
at commitAllLifeCycles (node_modules/react-dom/cjs/react-dom.development.js:9946:9)
at HTMLUnknownElement.callCallback (node_modules/react-dom/cjs/react-dom.development.js:542:14)
at Object.invokeGuardedCallbackDev (node_modules/react-dom/cjs/react-dom.development.js:581:16)
at invokeGuardedCallback (node_modules/react-dom/cjs/react-dom.development.js:438:27)
at commitRoot (node_modules/react-dom/cjs/react-dom.development.js:10050:9)
at performWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:11017:42)
at performWork (node_modules/react-dom/cjs/react-dom.development.js:10967:7)
at requestWork (node_modules/react-dom/cjs/react-dom.development.js:10878:7)
at scheduleWorkImpl (node_modules/react-dom/cjs/react-dom.development.js:10732:11)
at scheduleWork (node_modules/react-dom/cjs/react-dom.development.js:10689:12)
at scheduleTopLevelUpdate (node_modules/react-dom/cjs/react-dom.development.js:11193:5)
at Object.updateContainer (node_modules/react-dom/cjs/react-dom.development.js:11231:7)
at node_modules/react-dom/cjs/react-dom.development.js:15226:19
at Object.unbatchedUpdates (node_modules/react-dom/cjs/react-dom.development.js:11102:12)
at renderSubtreeIntoContainer (node_modules/react-dom/cjs/react-dom.development.js:15225:17)
at Object.render (node_modules/react-dom/cjs/react-dom.development.js:15290:12)
at Object.render (node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js:218:50)
at new ReactWrapper (node_modules/enzyme/build/ReactWrapper.js:98:16)
at mount (node_modules/enzyme/build/mount.js:19:10)
at mountWithIntl (tests/setupIntl.js:50:715)
at CanvasComponentTest (src/test/unit/components/CanvasComponentTest.js:71:49)
at Object.<anonymous> (src/test/unit/components/CanvasComponentTest.js:89:34)
I'm using enzyme mount
functionality to mount the component.
from react-konva.
Can someone create a very simple repository, where we can reproduce and play?
from react-konva.
@lavrton Hi I couldn't reproduce the issue I had before in a isolated test environment. Although it seems rendering (when using enzyme mount) renders a different structure then representing the JSX structure). Also added the test from the first post of this issue thread, which also errors out but not the same as reported here.
https://github.com/jesse-mm/react-konva-test
from react-konva.
I think it is not failing now. Please add more info if it is still not working.
from react-konva.
Related Issues (20)
- How to achieve a layered separation between children of the same group? HOT 9
- Uncaught TypeError: getImage.crop is not a function
- Shapes with opacity do not correctly apply layer pixelRatio and can appear blurry on zoom in HOT 4
- NextJS: Module not found: Can't resolve 'canvas' HOT 2
- Issue with RTL Text
- Facing the issue now with Next.js 14: HOT 5
- OnTouchStart does not contain touches HOT 1
- getRelativePointerPosition has an offset on x when going fullscreen
- Asynchronous drawing will exceed the cropping area HOT 4
- Free drawing performance HOT 6
- Transformer is not reusable HOT 2
- Coordinates not working correctly after zoom in/out or drag of stage HOT 1
- If I want to erase only the lines drawn with a pen, how can I do that? HOT 2
- Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. HOT 1
- Arrow Drag and Transform using anchors not working HOT 4
- load data to stage HOT 1
- Positioning issue with transformer using keepRatio prop set to false HOT 1
- Breaking changes in React experimental branch
- TypeScript : `'cornerRadius'` does not exist on type `Shape<RectConfig>` HOT 1
- Trouble with Drag-and-Drop on Mobile Devices in React (with react-konva) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-konva.