Skip to content

ERR_MODULE_NOT_FOUND when building static app #8

@richiejp

Description

@richiejp

Hi,

I found when trying to build my threlte based app for static deployment that I got an error similar to the following: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '<...>/node_modules/three/examples/jsm/postprocessing/EffectComposer' imported from <...>/.svelte-kit/output/server/entries/pages/index.svelte.js Did you mean to import three/examples/jsm/postprocessing/EffectComposer.js?

I saw that in threlte's svelte.config.js there are some extra vite options for threejs. It seems that adding the following "fixes" the issue:

		  ssr: {
		    noExternal: ['three']
		  }

However then index.svelte.js balloons to 1105.56KiB from 63.85KiB. This is not a big deal IMO. However are there any plans/ideas to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions