Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParametricGeometry not exported from three -> build error #1029

Closed
DaanKorver opened this issue Sep 2, 2022 · 4 comments
Closed

ParametricGeometry not exported from three -> build error #1029

DaanKorver opened this issue Sep 2, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@DaanKorver
Copy link

  • three version: 0.144.0
  • @react-three/fiber version: 8.6.2
  • @react-three/drei version: 9.25.3
  • node version: v16.15.1
  • npm (or yarn) version: 1.22.19

Problem description:

When importing <OrbitControls /> from @react-three/drei and build the project (with yarn build), the following error will occur:

./node_modules/three-stdlib/geometries/ParametricGeometries.js
Attempted import error: 'ParametricGeometry' is not exported from 'three' (imported as 'ParametricGeometry').

Relevant code:

import { OrbitControls } from '@react-three/drei'
import { Canvas } from '@react-three/fiber'

export function BoxContainer() {
  return (
    <Canvas>
      <OrbitControls />
      <ambientLight intensity={0.6} />
      <Box />
    </Canvas>
  )
}

function Box() {
  return (
    <mesh>
      <boxGeometry />
      <meshBasicMaterial />
    </mesh>
  )
}

Suggested solution:

@DaanKorver DaanKorver added the bug Something isn't working label Sep 2, 2022
@joshuaellis
Copy link
Member

Sounds like three-stdlib needs an update. Have you opened an issue there?

@DaanKorver
Copy link
Author

Will do that now.

@DaanKorver
Copy link
Author

Related issue from three-stdlib: #178

@ridhof
Copy link

ridhof commented Sep 4, 2022

it's already solved through new merged PR in three-stdlib by servinlp,
I tested in both latest version and the version my friend mentioned, 9.22.9, both works fine.

I think we can close the issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants