Closed jasoncslaughter closed 3 years ago
I did some more sleuthing on this, and I discovered part of what is happening. For some reason, it looks like when react-postprocessing
is referencing postprocessing
, it is resolving to node_modules/postprocessing/build/postprocessing.js
instead of node_modules/postprocessing/build/postprocessing.esm.js
.
I was able to work around this by adding the following to package.json
:
"alias": {
"postprocessing": "./node_modules/postprocessing/build/postprocessing.esm.js"
},
Any ideas of what might be causing this would be greatly appreciated. A bug in Parcel
maybe?
it's not a library issue, it's a bundler issue
three is a peer dependency
I am getting the error
Uncaught Error: Cannot find module 'three'
in the console log any time I try to use react-postprocessing. I am assuming that it is an incompatibility between the versions of the libraries I am using, maybe? All base functionality of @react-three/fiber seems to work fine, it is only when I include theEffectComposer
tag do I get the error. I tried to create an example on https://codesandbox.io/, but there it seems to work OK there.Here is the example code:
And here are my project dependencies:
console.log error:
Has anyone seen this issue before, or have any idea what might be causing it?
Thank you!