xxxxxxxxxx
yarn add three @react-three/fiber
yarn add next-transpile-modules @types/three --save-dev
//Then, add this to your next.config.js
const withTM = require('next-transpile-modules')(['three'])
module.exports = withTM()
xxxxxxxxxx
yarn add three @react-three/fiber
//if you are using nextjs
yarn add next-transpile-modules --save-dev
//if you are using typescript
yarn add @types/three --save-dev
//Then,if using nextjs add this to your next.config.js
const withTM = require('next-transpile-modules')(['three'])
module.exports = withTM()