Skip to content

Conversation

@ThierryBerger
Copy link
Contributor

@ThierryBerger ThierryBerger commented Aug 5, 2025

@sebcrozet sebcrozet merged commit 1328150 into dimforge:master Aug 8, 2025
6 checks passed
@sebcrozet
Copy link
Member

sebcrozet commented Aug 8, 2025

Thank you! Let’s try this fix. If it still fails we’ll just remove the type: module auto-added by wasm-pack.

@mattvb91
Copy link

So I can confirm this works on the server but unfortunately this has now broken my client build.

I dont think im running a too custom of a setup here so maybe you can give some guidance. I basically have a server / client game.

I have a some basic classes that are shared between the server and the client so I dont need to implement everything twice. That basically means that I have a shared/ package which holds for example a Base/Ball.ts

Now inside Ball.ts I need to import Rapier because I am defining colliders / Rigid bodies etc.. so I would do:

import type { Collider } from '@dimforge/rapier3d-compat'

Note the @dimforge/rapier3d-compat because I need to use this on the server (typescript) with no bundler.

Now inside my client and server classes (Client gets 3d Models assigned to it, and server gets custom movement logic) I basically do

import SharedBall from '../shared/Base/Ball.ts'

export default class Ball extends SharedBall { }

On the client however I AM using a bundler (vite) and it breaks there now. However I need to continue using '@dimforge/rapier3d-compat' because im extending the class from it.

Do you have a suggestion on how do handle server / client with shared classes with a physics world?

Seems to have broken for other people too: #330 (comment)

@sebcrozet
Copy link
Member

Hey @mattvb91! Sorry this is still causing issues.
I applied the change suggested in #330 and released 0.18.2. Please let me know if that fixes it for you.

@mattvb91
Copy link

No problem at all @sebcrozet im more amazed at how broken the npm ecosystem is getting. (This isnt the first package to have these issues and it seems to be piling up).

18.2 is still broken for me with Module '"@dimforge/rapier3d-compat"' has no exported member

Patching out type: module it works fine again.

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.

@dimforge/rapier3d-compat"' has no exported member 'World'.

3 participants