Three.js / Syntaxis Error #12618
-
Hi, I'm using Next.js with react-three-fiber, but I try load libreries fron three I get an Syntaxis Error:
This is the code of component
The same happens with other dependencies of the Three library, but when I use create-react-app the code run succesfully. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This issue might be of some help: #9890 Aside from that issue, I was able to get around that error importing the import dynamic from 'next/dynamic'
const Model = dynamic(
() => import('../components/Model'),
{ ssr: false }
) |
Beta Was this translation helpful? Give feedback.
This issue might be of some help: #9890
Aside from that issue, I was able to get around that error importing the
<Model/>
component via a dynamic import that is not server rendered: