adrianhajdin / ecommerce_sanity_stripe

Modern Full Stack ECommerce Application with Stripe

Home Page:https://jsmastery.pro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sanity schema problem

chaima-elm opened this issue · comments

i get this error in sanity when exporting schemas: SyntaxError: The requested module '/node_modules/.sanity/vite/deps/sanity.js?v=437cca74' does not provide an export named 'default'
image

write this:

import product from './product'
import banner from './banner'

export const schemaTypes = [ product, banner ]

Here is what I did covert index.js to index.ts write the code of @Artemushek it solved my error.

import banner from './banner'
import product from './product'

export const schemaTypes = [banner,product]