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

No matching export in "node_modules/three/build/three.module.js" for import "sRGBEncoding" #35

Open
Bunkerbewohner opened this issue Apr 27, 2024 · 0 comments

Comments

@Bunkerbewohner
Copy link

Hi!

First of all, amazing library you created here! Great work!
I want to play around with it a bit, but I'm having issues,
I'm using these dependencies:

"devDependencies": {
    "@types/react-dom": "^18.2.25",
    "@types/three": "^0.164.0",
    "typescript": "^5.4.5"
  },
  "dependencies": {
    "@react-three/drei": "^9.105.4",
    "@react-three/fiber": "^8.16.2",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "three": "^0.164.1",
    "three-landscape": "^0.9.2",
    "vite": "^5.2.10"
  },

But vite is throwing errors when trying to import the library:

 No matching export in "node_modules/three/build/three.module.js" for import "sRGBEncoding"

    node_modules/three-landscape/dist/util/generateTextureArray.js:1:114:
      1 │ ...at, UnsignedByteType, LinearMipMapLinearFilter, NearestFilter, RepeatWrapping, sRGBEncoding } from "three";
        ╵       

No matching export in "node_modules/three/build/three.module.js" for import "sRGBEncoding"

    node_modules/three-landscape/dist/util/util.js:69:67:
      69 │ import { RepeatWrapping, NearestFilter, LinearMipmapNearestFilter, sRGBEncoding } from "three";

It looks like maybe THREE renamend sRGBEncoding to sRGBColorSpace and the encoding property on textures to colorSpace.

I guess the way to fix this is upgrading the dependencies of the library and making use of those new names, right?
Well, I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant