My was static website was deployed for a few month with no issue and I just added a new files in my store folder and since then there is an issue during deployment. These are the logs:
vite v5.4.8 building for production…
transforming…
✓ 1028 modules transformed.
x Build failed in 8.55s
error during build:
[vite-plugin-pwa:build] Could not load /opt/render/project/src/src/backend/LivestreamApi (imported by src/stores/livestreams.ts): ENOENT: no such file or directory, open ‘/opt/render/project/src/src/backend/LivestreamApi’
at async open (node:internal/fs/promises:639:25)
at async Object.readFile (node:internal/fs/promises:1249:14)
at async Object.load (file:///opt/render/project/src/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:65034:25)
at async PluginDriver.hookFirstAndGetPlugin (file:///opt/render/project/src/node_modules/rollup/dist/es/shared/node-entry.js:20630:28)
at async file:///opt/render/project/src/node_modules/rollup/dist/es/shared/node-entry.js:19750:33
at async Queue.work (file:///opt/render/project/src/node_modules/rollup/dist/es/shared/node-entry.js:20840:32)
ERROR: “build-only” exited with 1.
==> Build failed
==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys
I see that in the path there is src/src it could be the issue. this is my livestream.ts file:
import { defineStore } from ‘pinia’
import LivestreamApi from ‘@/backend/LivestreamApi’
import type { Livestream } from ‘@/interfaces/Livestream’
export const useLivestreamStore = defineStore(‘livestream’, {
state: () => ({
livestreams: as Livestream,
livestream: {} as Livestream,
next: {} as Livestream
}),
actions: {
async fetchNextLivestream() {
const response = await LivestreamApi.next()
this.next = response.data
return response
}
},
getters: {}
})
In every store file I import api files in the exact same manner. I don’t see where the issue could be from.