VTK.js TypeError: Cannot read properties of undefined (reading 'SURFACE')

How can i solve this problem occured after [npm run build] with react.js
but in development environment, it can work successfully.


thank you!

What version of vtk.js are you using? How are you building your application?

v30.10.1。 In both Vuejs & ReactJS development mode, it can run successfully. But it would failed after build.

why?

Can you provide a snippet of the code in your codebase that results in this error?

Hey, just reduce the version of vtk.js to 28.0.0, will work.