react-org-chart icon indicating copy to clipboard operation
react-org-chart copied to clipboard

TypeError: O is not a function

Open confrodog opened this issue 5 years ago • 7 comments

i think it might have something to do with the image addition

Screen Shot 2020-06-24 at 3 02 42 PM

I was trying to learn how to use this module by building one attribute at a time, but couldn't even get past the first one

confrodog avatar Jun 24 '20 22:06 confrodog

Had the same issue and could not resolve it. Ended up deleting the repo.

waynedyck avatar Jan 28 '21 18:01 waynedyck

Same issue here. Was anyone able to resolve it?

ERROR:
O is not a function

CALL STACK:
TypeError: O is not a function
    at SVGImageElement.<anonymous> (https://localhost:4321/dist/program-chart-web-part.js:499:2638)
    at SVGImageElement.attrFunction (https://localhost:4321/dist/program-chart-web-part.js:1383:21)
    at https://localhost:4321/dist/program-chart-web-part.js:1676:16
    at d3_selection_each (https://localhost:4321/dist/program-chart-web-part.js:1682:30)
    at Array../node_modules/d3/d3.js.d3_selectionPrototype.each (https://localhost:4321/dist/program-chart-web-part.js:1675:12)
    at Array../node_modules/d3/d3.js.d3_selectionPrototype.attr (https://localhost:4321/dist/program-chart-web-part.js:1366:17)
    at t.exports (https://localhost:4321/dist/program-chart-web-part.js:499:2582)
    at init (https://localhost:4321/dist/program-chart-web-part.js:433:2875)
    at e.value (https://localhost:4321/dist/program-chart-web-part.js:451:1739)
    at ss (https://res-1.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_37194a91081a5a32a8fa7de43d5df223.js:69:89313)
+-- [email protected]
+-- [email protected]
node.js v14.19.1

Zerg00s avatar May 26 '22 15:05 Zerg00s

@Zerg00s not as of today. I would still like to get this working as it is one of the best looking ones I have found.

waynedyck avatar May 26 '22 17:05 waynedyck

Try using a class component instead of a functional component

rastogi-rishabh avatar May 28 '22 04:05 rastogi-rishabh

anyone managed to solve this?

pedrohsmaia avatar May 24 '23 05:05 pedrohsmaia

Thanks @rastogi-rishabh! Using a class component fixed this issue for me :)

sarahm16 avatar Apr 12 '24 17:04 sarahm16

@sarahm16 do you have a small code sample you code post of how you solved the TypeError?

waynedyck avatar Apr 16 '24 14:04 waynedyck