Search code examples
node.jsreact-nativerealmnode-modulesrealm-mobile-platform

After installed Realm in React Native, Can't find module /../../node-pre-gyp


After installed Realm into my React-Native project, while I tried to build my project, I'm getting the following errors:

`node-pre-gyp install --fallback-to-build`

> >  Can't find module /../../node-pre-gyp 
> 
> ld: library not found for
> > -lRealmReact clang: error: linker command failed with exit code 1 (use -v to see invocation)

Even, I tried to remove nodemodules and package-lock.json and installed npm.

I am doing this in Mac.

But, Same issue happening.


Solution

  • Try installing node-gyp globally. The command to do so looks like this

    npm install -g node-gyp