Skip to content

Rapier basic project doesn't work with react 19? #771

Description

@DavoodFaezian

I can't load the basic project. This is the error I get
Uncaught TypeError: Cannot read properties of undefined (reading 'raweventqueue_new')
at new z (chunk-I25HNKKT.js?v=1bc912fb:961:18)
at new Rg (chunk-I25HNKKT.js?v=1bc912fb:4467:22)
at @react-three_rapier.js?v=1bc912fb:666:37
at useConst (@react-three_rapier.js?v=1bc912fb:150:51)
at Physics (@react-three_rapier.js?v=1bc912fb:666:22)
at react-stack-bottom-frame (chunk-WLGTK6LN.js?v=1bc912fb:10461:20)
at renderWithHooks (chunk-WLGTK6LN.js?v=1bc912fb:3249:24)
at updateFunctionComponent (chunk-WLGTK6LN.js?v=1bc912fb:4827:22)
at beginWork (chunk-WLGTK6LN.js?v=1bc912fb:5836:20)
at runWithFiberInDEV (chunk-WLGTK6LN.js?v=1bc912fb:892:18)

THREE.WebGLRenderer: Context Lost.

This is the error I get.
My project is in type script and I only copied the App.tsx from the react-rapier docs. So I assume the problem should be in
my package.json

"dependencies": {
"@dimforge/rapier3d-compat": "^0.18.2",
"@react-spring/three": "^10.0.1",
"@types/three": "^0.177.0",
"leva": "^0.10.0",
"react": ">=19.1.0",
"react-dom": ">=19.1.0",
"three": ">=0.177.0",
"zustand": "^5.0.1"
},
"devDependencies": {
"@eslint/js": "^9.33.0",
"@react-three/drei": "^10.3.0",
"@react-three/fiber": "^9.1.2",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"eslint": "^9.33.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.3.0",
"r3f-perf": "^7.2.3",
"typescript": "^5.8.3",
"typescript-eslint": "^8.39.1",
"vite": "^7.1.2"
},
"peerDependencies": {
"@react-three/drei": ">=9.0",
"@react-three/fiber": ">=9.0",
"@react-three/rapier": ">=2.0.0",
"react": ">=19.1.0",
"react-dom": ">=19.1.0",
"three": ">=0.177.0"
}

Can someone run the project with the exact same package.json and see if they encounter the same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions