require not defined for @jscad/csg and @jacad/stl-serializer package required for toJscadSTL function #571
-
I have encountered an issue "require is not defined" while importing the @jscad/csg and @jacad/stl-serializer package which is required for toJscadSTL function. The website was built in typescript and i found that the issue occured in the package. Kindly help me to fix this issue and my main objective is to create a 3D model. I have already created the 2D model and i need to create a 3D model for the view. Please help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Can you describe your build and/or runtime environment? For example, are you using a |
Beta Was this translation helpful? Give feedback.
-
Are you using a bundler, like webpack for example? Also, I'm unsure how you've installed the |
Beta Was this translation helpful? Give feedback.
I've created a sample repo which shows a minimal working example: https://github.com/danmarshall/makerjs-jscad-vite
Notable points: