#Cannot read properties of undefined (reading 'ui/ProductSelect#default')

11 messages · Page 1 of 1 (latest)

white tokenBOT
echo thunder
#

bash Error: Cannot read properties of undefined (reading '@payloadcms/ui/shared#emptyComponent')
I get similar error and I found the source:
Location: @vernal juniper/ui/dist/providers/Config/createClientConfig/getComponent.js

13 |     const key = path + '#' + exportName;
 14 |     console.log("PAYLOAD FFF: ", importMap, key, importMap?.key)
> 15 |     const Component = importMap[key];
    | ^
 16 |     if (!Component && !silent) {
 17 |         console.error(`getComponent: Component not found in importMap`, {
 18 |             identifier,

the console log says this:
bash PAYLOAD FFF: undefined @payloadcms/ui/shared#emptyComponent undefined

Haven't resolved it yet

lapis granite
#

Install latest beta, then run pnpm generate:importmap

frigid lichen
#

Hi Alessio, I think I've found a related problem (maybe). I've changed my admin and api routes in payload.config.ts and when I run npm run generate:importmap, I get the below error - seems the renaming is not being taken into account? Or perhaps I'm making a newbie error? (trying payload for the first time atm). Any help appreciated. Cheers.

Error: Could not find the payload admin directory. Looked in C:<my payload dir>\app(payload)\admin and C:<my payload dir>\src\app(payload)\admin
at writeImportMap (C:<my payload dir>\node_modules\payload\src\bin\generateImportMap\index.ts:181:11)
at generateImportMap (C:<my payload dir>\node_modules\payload\src\bin\generateImportMap\index.ts:150:9)

#

PS Also running beta.88

#

admin and api directories have been renamed to match the payload.config.ts file route entries and prior to updating to beta.88, this was working as expected (using beta.77)

winged pulsar
frigid lichen
#

No, no luck so far. Did a fresh install, changed the routes and tried again - same error. I'll open an issue.

frigid lichen
solemn sapphire
#

@echo thunder Did you resolve this? I'm facing the exact same issue with beta 107, even after completing the migration guide.

#

@lapis granite Regenerating the importMap doesn't seem to resolve it - the emptyComponent is definitely there.