Skip to content

Conversation

@mnmustafa1109
Copy link

Problem

The build fails when compiling the Admin UI with the following error:
Attempted import error: 'TenantSelector' is not exported from '@payloadcms/plugin-multi-tenant/client'.

The TenantSelector component is required for the admin interface, but it was missing from the public export definitions in src/exports/client.ts (and/or src/exports/rsc.ts). This prevented the Payload admin bundler and import map from resolving the component correctly during the build process.

Solution

I have updated the export entry points to explicitly export the TenantSelector component.

  • Added export { TenantSelector } from '../components/TenantSelector/index.js' to src/exports/client.ts.
  • Ensured the component is accessible via the package's defined exports, allowing the admin panel import map to generate successfully.

Related Issues

Fixes #[IssueNumber]

Updating path will fix the issue

Failed to compile.

./src/app/(payload)/admin/importMap.js
Attempted import error: 'TenantSelector' is not exported from '@payloadcms/plugin-multi-tenant/client' (imported as 'TenantSelector_1d0591e3cf4f332c83a86da13a0de59a').

Import trace for requested module:
./src/app/(payload)/admin/importMap.js
./src/app/(payload)/layout.tsx


> Build failed because of webpack errors
 ELIFECYCLE  Command failed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant