Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@adminjs/relations rendering error: Error: Component "RelationsShowPropertyComponent" has not been bundled #1649

Open
Dr4CuK30 opened this issue Apr 2, 2024 Discussed in #1648 · 1 comment

Comments

@Dr4CuK30
Copy link

Dr4CuK30 commented Apr 2, 2024

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

This is the browser console output:
Captura de pantalla 2024-04-02 a la(s) 2 58 20 p  m

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:
Captura de pantalla 2024-04-02 a la(s) 3 02 34 p  m

@tillkolter
Copy link

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.

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

No branches or pull requests

2 participants