Generating import map
/Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/src/bin/generateImportMap/index.ts:69
componentPath.startsWith('.') || componentPath.startsWith('/')
^
TypeError: Cannot read properties of undefined (reading 'startsWith')
at addPayloadComponentToImportMap (/Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/src/bin/generateImportMap/index.ts:69:21)
at addToImportMap (/Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/src/bin/generateImportMap/index.ts:126:9)
at iterateConfig (/Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/src/bin/generateImportMap/iterateConfig.ts:49:3)
at generateImportMap (/Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/src/bin/generateImportMap/index.ts:143:3)
at bin (/Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/dist/bin/index.js:64:16)
at async start (file:///Volumes/payload/node_modules/.pnpm/payload@3.0.0-beta.91_graphql@16.9.0_typescript@5.5.4/node_modules/payload/bin.js:30:7)
Node.js v22.6.0
ELIFECYCLE Command failed with exit code 1.related payload.config.ts:
export default buildConfig({
admin: {
importMap: {
baseDir: path.resolve(dirname),
},
components: {
OAuthLoginButton: {
path: '/app/components/OAuthLoginButton/OAuthLoginButton#OAuthLoginButton',
},
graphics: {
Icon: {
path: '/app/components/Icon/Icon#Icon',
},
Logo: {
path: '/app/components/Logo/Logo#Logo',
},
},
},Interesting, I just tested this and it worked for me
graphics: {
Icon: {
path: '/components/Icon/index.js#Icon',
},
Logo: '/components/Logo/index.js#Logo',
},file extension shouldnt matter here, this is in our monorepo ^
yeah, I just pulled out all the components from the config and still get the error when generated an importmap
anything weird in the importMap.js file?
no, I copy/pasta'd it from the template/website commit
had to pull out the empty module as it was creating an error
but from what I grok, I could also just blank that file out, and it should generate a new one, right?/
pretty sure yeah
the minimum it might need is
export const importMap = {}yeah, same error. pulled out all the custom components from the config, and set the importmap.js as above.
I'll go back through what I changed to catch up
this is beta 91, so I can also revert back to the last supported website/template beta and see if it resolves

it was caused by something in a plugin config
ok, appears to be related to passing my google login button into the plugin config ( OAuthLoginButton ).
Star
Discord
online
Get dedicated engineering support directly from the Payload team.