this is my custom component :
'use client'
import React, { useState } from 'react'
export function MyClientComponent() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(count + 1)}>Clicked {count} times</button>
}
I add to collection from :
admin: {
useAsTitle: 'title',
components: {
views: {
edit: {
default: {
Component: '/components/custom_component',
},
},
},
},
},
when i open my collection, i got this error :
getFromImportMap: PayloadComponent not found in importMap {
key: '/components/custom_component#default',
PayloadComponent: '/components/custom_component',
schemaPath: ''
} You may need to run the `payload generate:importmap` command to generate the importMap ahead of runtime.
so i run the command, but no luck.
then I see the importmap, the file exist (image attached).
what did I do wrong here?
thank you