Missing prebuilds/node when using node v23
How frequently does the bug occur?
Always
Description
I've just upgraded my codebase to node v23. After running yarn install and yarn start, my Node app using Realm does not start anymore saying Cannot find module '/home/app/node_modules/realm/prebuilds/node/realm.node'.
And indeed, ls -la node_modules/realm/prebuilds shows only android and apple.
When I switch back to node v22 and run yarn install and yarn start again, it works as node_modules/realm/prebuilds contains android, apple and node.
Stacktrace & log output
Error: Cannot find module '/home/app/node_modules/realm/prebuilds/node/realm.node'.
Can you reproduce the bug?
Always
Reproduction Steps
Assuming you have a project with package.json having [email protected] as a dependency.
nvm use 22
rm -rf node_modules && yarn install
ls -la node_modules/realm/prebuilds # OK => contains android, apple and node
nvm use 23
rm -rf node_modules && yarn install
ls -la node_modules/realm/prebuilds # KO => contains android, apple but not node
Version
12.14.1
What services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
macOS Sequoia
Build environment
No response
Cocoapods version
No response
FWIW I am on [email protected] and and [email protected] and do not have this issue.
Same issue here, but your solution has no success (Node:v22.14.0, Realm: 12.11.0)
nvm use 22 rm -rf node_modules && yarn install ls -la node_modules/realm/prebuilds # OK => contains android, apple and (NOT NODE)
Is there any update on this?
Is there any update on this?
None. If you're a paying customer hitting this issue, please ensure you reach out via the official support channels.
Any help from the community investigating, debugging and fixing this would be highly appreaciated.
We have the same issue after upgrading node from 22.13.1 to 22.14.0. Updating the prebuild-install dependency of Realm to version 7.1.3 (see related issue) fixed the problem for us. This can be done by running npm update prebuild-install and does not require an update of Realm.