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

ReferenceError: self is not defined

Open ibytao opened this issue 3 years ago • 3 comments

ReferenceError: self is not defined at Object. (/Users/nemo/Downloads/react-diagrams/decision-engine/node_modules/@projectstorm/react-diagrams-core/dist/index.umd.js:2:248) at Module._compile (internal/modules/cjs/loader.js:1158:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) at Module.load (internal/modules/cjs/loader.js:1002:32) at Function.Module._load (internal/modules/cjs/loader.js:901:14) at Module.require (internal/modules/cjs/loader.js:1044:19) at require (internal/modules/cjs/helpers.js:77:18) at Object.hxca (/Users/nemo/Downloads/react-diagrams/decision-engine/.next/server/pages/statistics/query/detail/customCanvas/custom/CustomNodeWidget.js:292:18) at webpack_require (/Users/nemo/Downloads/react-diagrams/decision-engine/.next/server/pages/statistics/query/detail/customCanvas/custom/CustomNodeWidget.js:23:31) at Module.FDMe (/Users/nemo/Downloads/react-diagrams/decision-engine/.next/server/pages/statistics/query/detail/customCanvas/custom/CustomNodeWidget.js:197:91) { type: 'ReferenceError' }

ibytao avatar May 27 '21 08:05 ibytao

Looks like ye olde server-side-rendering issue.

Perhaps using nextjs dynamic import will help:

https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr

rob-myers avatar May 27 '21 12:05 rob-myers

This kills types .. not a good solution

rondorkerin avatar May 24 '23 17:05 rondorkerin

Any update on this, is there better way to do this?

kodi avatar Mar 16 '24 13:03 kodi