Closed hybridherbst closed 8 months ago
Thanks for the report! That's a bummer. I'll prepare a fix in a bit.
Should be fixed in postprocessing@6.35.1
.
I installed via npm and it seems to still be in there:
And when building my app I get:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/xyz/nodeprojects/xyz.com/build/node_modules/three/examples/jsm/misc/Timer.js' imported from /home/xyz/nodeprojects/xyz.com/build/node_modules/postprocessing/build/index.js
at finalizeResolution (node:internal/modules/esm/resolve:263:11)
at moduleResolve (node:internal/modules/esm/resolve:908:10)
at defaultResolve (node:internal/modules/esm/resolve:1131:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///home/xyz/nodeprojects/xyz.com/build/node_modules/three/examples/jsm/misc/Timer.js'
@sommerper Uh oh, that's another regression. Timer
was added in three
r160 which means that using older versions of three
results in an error. I'll push a fix tomorrow.
@sommerper Should be fixed in postprocessing@6.35.2
.
Description of the bug
I think this is a regression introduced by https://github.com/pmndrs/postprocessing/commit/2aab3111cd56627b17d86f1869eac37ca66321e0. The timer import incorrectly uses "addons" which requires import maps support or correct package.json exports parsing (not available for every tool/bundler/combination, see https://github.com/mrdoob/three.js/pull/27381)
Example when using Vite 4.x:
I think it should use
three/examples/jsm
instead ofthree/addons
.