Open Jensderond opened 1 year ago
Are you passing S
and context
in from the structure
function?
I do believe so, here's my config
sanity.config.js
plugins: [
deskTool({
structure: (S, context) => {
return S.list()
.title('Site')
.items([
orderableDocumentListDeskItem({
title: 'Properties',
icon: MdHome,
type: 'property',
child: S.documentTypeList('property').title('Properties'),
S,
context
}),
])
}
}),
]
I had this issue with sanity 3.4.0. Updating to 3.5.0 seems to have resolved itself.
I have this exact issue, after following tutorial / docs and integrating in my simple site, when I click the list in the deskTool I get the same error - while using a newer stack than eglove commented about. The only thing I am afraid of is that it is somehow related to me running Next.js and sanity using next-sanity. Most of these libraries are up to date at the time of writing:
"@sanity/dashboard": "^3.1.6",
"@sanity/orderable-document-list": "^1.2.1",
"@sanity/vision": "^3.29.1",
"next": "14.1.0",
"next-sanity": "^8.0.0",
"sanity": "^3.29.1"
I should also add that the admin (deskTool) starts with Hydration errors. But it starts - its only when I click the document list in question that the "Error: Could not find source context" appears.
I get the following error when opening the item that uses orderable-document-list
Error: Could not find
source
contextproperty:
Using versions: sanity: 3.2.6 @sanity/orderable-document-list: 1.0.2