-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Describe the bug
I'm trying to implement the cloudinarySchemaPlugin from the sanity-plugin-cloudinary package in my Sanity project. However, I'm encountering an error:
Error: Right side of assignment cannot be destructured
responsiveStackSpaceStyle@
_e@
@
@
@
renderWithHooks@
updateForwardRef@
beginWork@
performUnitOfWork@
workLoopSync@
renderRootSync@
recoverFromConcurrentError@
performSyncWorkOnRoot@
flushSyncWorkAcrossRoots_impl@
flushSyncWorkOnAllRoots@
processRootScheduleInMicrotask@
@
This error occurs when navigating to the resource where the cloudinary.asset is defined.
To Reproduce
Steps to reproduce the behavior:
- Install
sanity-plugin-cloudinaryusingpnpm add sanity-plugin-cloudinary. - Import
cloudinarySchemaPluginin the Sanity configuration file and add it to the plugins array. - Declare a field to be
cloudinary.assetin the schema.
const lesson = {
name: 'lesson',
title: 'Lesson',
type: 'document',
fields: [
{
name: 'title',
title: 'Title',
type: 'string',
},
{
name: 'slug',
title: 'Slug',
type: 'slug',
options: {source: 'title', maxLength: 96},
},
{
name: 'url',
title: 'URL',
type: 'url',
},
{
type: 'cloudinary.asset',
name: 'image',
description: 'This asset is served from Cloudinary',
},
{
name: 'content',
title: 'Content',
type: 'array',
of: [{type: 'block'}],
},
],
}
export default lesson- Run the project.
Expected behavior
I expected the cloudinarySchemaPlugin to be implemented successfully without any errors.
Screenshots
Which versions of Sanity are you using?
'2023-11-08'
What operating system are you using?
Darwin laurosilvacom 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64
Which versions of Node.js / npm are you running?
9.2.0
v19.3.0
Additional context
- Next.js: "next": "14.0.4"
- React: "react": "^18.2.0"
- Sanity: "sanity": "^3.21.3"
These are the versions of the packages that my project is currently using.
Metadata
Metadata
Assignees
Labels
No labels