Skip to content

❗️ Build error with Fluid Sanity Studio (vite alias issue) #488

Description

@ldifazio

Hi team,

I've followed the README from scratch using npm create fluid@latest.
When trying to build or start the Studio, I get this Vite error:

`File: /Users/XXXX/Sites/headless-filo/sanity.config.ts:9:33
1 | import { defineSanityConfig } from "~/sanity/config";
| ^
2 | const projectId = process.env.PUBLIC_SANITY_STUDIO_PROJECT_ID;
3 | const dataset = process.env.PUBLIC_SANITY_STUDIO_DATASET;
at TransformPluginContext._formatLog (file:///Users/XXXXXXX/Sites/headless-fio/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:42499:41)
at TransformPluginContext.error (file:///Users/XXXXXX/Sites/headless-filo/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:42496:16)
at normalizeUrl (file:///Users/XXXXXX/Sites/headless-filo/node_modules/vite/dist/node/chunks/dep .....

I haven’t changed anything from the default install. The alias ~ points to app/, but it seems to break during the Studio build (Sanity v3). Full error trace included below.

Is this a known issue, or should I update something in vite.config.ts or sanity.config.ts?

Thanks in advance 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions