Error: Cannot import $env/static/private.js into client-side code

Trying to deploy my site(deft-mandazi-94bcf0) for the first time but getting the following error:

1:23:33 AM: [vite-plugin-svelte-kit] Cannot import $env/static/private.js into client-side code:
1:23:33 AM: - src/routes/index.svelte
1:23:33 AM: - $env/static/private.js
1:23:33 AM: error during build:
1:23:33 AM: Error: Cannot import $env/static/private.js into client-side code:
1:23:33 AM: - src/routes/index.svelte
1:23:33 AM: - $env/static/private.js
1:23:33 AM: at prevent_illegal_rollup_imports (file:///opt/build/repo/node_modules/@sveltejs/kit/dist/chunks/sync.js:1112:19)
1:23:33 AM: at Object.writeBundle (file:///opt/build/repo/node_modules/@sveltejs/kit/dist/vite.js:2290:6)
1:23:33 AM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:22695:37
1:23:33 AM: at async Promise.all (index 0)
1:23:33 AM: at async file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:23718:13
1:23:33 AM: at async catchUnfinishedHookActions (file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:23041:20)
1:23:33 AM: at async doBuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-c6273c7a.js:43506:20)
1:23:33 AM: at async build (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-c6273c7a.js:43330:16)
1:23:33 AM: at async CAC. (file:///opt/build/repo/node_modules/vite/dist/node/cli.js:747:9)

Couldn’t find any solution. Kindly help.

Hi @ijsucceed,

Could you share a reproduction repo - a minimal one please?

Oh, thanks, it has been fixed.

Thanks so much for coming back and letting us know. I am happy to hear this is working now! Happy building :rocket: