Issue deploying sveltekit app to prod after sst version 3.1.78

When I deploy any sst sveltekit app to production I get an error unless I use an older version of sst. I’m showing the problem below with the sveltekit demo app from the sst GitHub site. This might be better submitted as a problem but I thought I’d ask here first.

Environment: Mac mini (m1), Sonoma, sst 3.2.11, node v21.7.3

Code: ion/examples/aws-svelte-kit at dev · sst/ion · GitHub

npx sst upgrade
npm update
npx sst deploy --stage prod

… standard build info up to the error …

| Created MyWeb sst:aws:SvelteKit → MyWebBuild sst:Run (1.4s)
| Created LambdaEncryptionKey random:index:RandomBytes
| Created MyWeb sst:aws:SvelteKit → MyWebServer sst:aws:Function
| Error
| Error: read /Users/tonysamsom/Desktop/ion/examples/aws-svelte-kit/.svelte-kit/svelte-kit-sst/prerendered: is a directory
| at IncomingMessage. (file:///Users/tonysamsom/Desktop/ion/examples/aws-svelte-kit/.sst/platform/src/components/rpc/rpc.ts:42:22)
| at IncomingMessage.emit (node:events:526:35)
| at IncomingMessage.emit (node:domain:488:12)
| at endReadableNT (node:internal/streams/readable:1408:12)
| at processTicksAndRejections (node:internal/process/task_queues:82:21) {
| promise: Promise { [Circular *1] }
| }
| Created MyWeb sst:aws:SvelteKit → MyWebServerCachePolicy aws:cloudfront:CachePolicy
| Created MyWeb sst:aws:SvelteKit → MyWebServerLogGroup aws:cloudwatch:LogGroup
| Created MyWeb sst:aws:SvelteKit → MyWebAssetFiles sst:aws:BucketFiles (1.3s)
| Created MyWeb sst:aws:SvelteKit → MyWebServerRole aws:iam:Role (1.3s)
| Created MyWeb sst:aws:SvelteKit → MyWebCdn sst:aws:CDN
| Created MyWeb sst:aws:SvelteKit → MyWebCloudfrontFunctionServerCfFunction aws:cloudfront:Function (2.9s)

…… downgrading sst with the example code successfully deploys

npx sst upgrade 3.1.78
npm update
npx sst deploy --stage prod

✓ Complete
MyWeb: https://d2a8v20tfn3pxn.cloudfront.net