-
-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Hi,
I've made a new project with SanityPress but I can't seem to get it built and deployed properly. I wanted to set up the deployments via Sanity Studio.
I've tried this:
npx sanity build
Which leads to:
✓ Clean output folder (7ms)
✗ Build Sanity Studio
`[vite]: Rollup failed to resolve import "@/sanity/lib/env" from ".../sanity.config.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
npx sanity start causes this when I go to localhost:3333:
[plugin:vite:import-analysis] Failed to resolve import "@/sanity/lib/env" from "sanity.config.ts". Does the file exist?
And in the console running the dashboard tool, I'm getting more errors in a similar vein:
[vite] (client) Pre-transform error: Failed to resolve import "@/lib/env" from "src/sanity/presentation.ts". Does the file exist?
I've also checked tsconfig.json, which has this from the default setup:
"paths": { "@/*": [ "./src/*" ], "$/*": [ "./*" ], "react": [ "./node_modules/@types/react" ] }
I'd appreciate any help on this. Other than the .env files, I haven't changed anything to do with the build process so I'm confused why it won't work out of the box.