Unable to resolve module ./zlib_bindings

Viewed 2516

We are working on an customised react native app using rocketchat sdk node module. When we are running the app it is giving the below error :

zlib added using

npm i zlib —-save

error: Error: Unable to resolve module ./zlib_bindings from /projectpath/rocketchatsampleclient/node_modules/zlib/lib/zlib.js: None of these files exist: * node_modules/zlib/lib/zlib_bindings(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)

  • node_modules/zlib/lib/zlib_bindings/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)

1 | module.exports = require('./zlib_bindings');

1 Answers

The problem was that it is a node module built for node applications and not for react native application. So, i replaced it with the node module built for react native application. I replaced the rocket chat sdk package built for react native and that fixed all the problems.

Related