@adminjs/relations rendering error: Error: Component "RelationsShowPropertyComponent" has not been bundled
Dr4CuK30 opened this issue · comments
Discussed in #1648
Originally posted by Dr4CuK30 April 2, 2024
Hello guys,
I wrote a implementation of relations (one to many and many to many) using the @adminjs/relations but is generating the following error in the visual generated resources that have this relations:
![Captura de pantalla 2024-04-02 a la(s) 2 56 55 p m](https://private-user-images.githubusercontent.com/75185363/318943899-1cfafb4e-6ca1-43b0-80d9-dd848a323a69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0NjkxOTcsIm5iZiI6MTcxOTQ2ODg5NywicGF0aCI6Ii83NTE4NTM2My8zMTg5NDM4OTktMWNmYWZiNGUtNmNhMS00M2IwLTgwZDktZGQ4NDhhMzIzYTY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI3VDA2MTQ1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkOGU2NjEzNTJhYWFhYWUxM2YzYzk3OGViYjAxYTMwOTJhMWZlNWZlZTMxNjgxYjE5YjkxZjg1M2RmMWNjOWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bx7d13FQI9RdYK9WaPZ6nstpA3E6jAqf8uJTFfWTiFs)
This is the browser console output:
And this is my resources:
const createStreamingResource = () => ({ resource: Streaming, options: { navigation: { icon: 'Users' }, }, features: [ owningRelationSettingsFeature({ componentLoader, licenseKey: process.env.LICENSE_KEY, relations: { members: { type: RelationType.ManyToMany, junction: { joinKey: 'streamingId', inverseJoinKey: 'collaboratorId', throughResourceId: 'StreamingCollaborator', }, target: { resourceId: 'Collaborator', }, }, }, }), ], });
And my packege.json:
I was facing the same issue and suspected the regression was introduced here
I downgraded to the version before the update and it worked again.
But then I realized that the bundling approach was not really "production-like", so I chose to add @adminjs/bundler
and add an assets bundling step to my CI. Now everything works on the most recent version.