question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: bundling failed: “Unable to resolve module buffer from D:\\ProjectABC\\node_modules\\safe-buffer\\index.js: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all.\n 2. Delete the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start -- --reset-cache.”

Used it like the example using require, and even tried import - same result. Also installing the module ‘buffer’ seperately doesnt help anything. I guess it’s deprecated?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
nimabk82commented, Nov 13, 2017

I had same problem and npm i buffer solved my issue. https://github.com/bartonhammond/snowflake/issues/98

2reactions
amagidcommented, Apr 27, 2018

So I just had this issue and have been looking into it - it looks like this module breaks because it requires the “randombytes” module, which requires “safe-buffer”, which in turn requires “buffer”. “Buffer” is a Node standard library api, meaning that it ships by default with an installation of Node. Problem is, Node standard library modules are largely written in C++ like the rest of Node, and are not written in Javascript like most NPM modules. Since React Native has no capability for running C++ code, “buffer” doesn’t work, and hence neither does this package.

As far as I can tell, @eugenehp can fix this issue by removing randombytes from the implementation, swapping it out with a module that performs the same function but is written specifically for React Native. I haven’t checked, but this one might work:

https://github.com/mvayngrib/react-native-randombytes

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is another word for "doesn't work"? - WordHippo
What is another word for doesn't work? Adjective. Not physically functioning or working. unusable · inoperable · broken · defective.
Read more >
Which is correct, 'it doesn't work' or 'It doesn't works'? - Quora
“it doesn't work” is correct. As you know, English uses the helping verb do for negative statements and for questions. The only thing...
Read more >
Willpower Doesn't Work: Discover the Hidden Keys to Success
Dr. Benjamin Hardy is an organizational psychologist and best-selling author of Willpower Doesn't Work and Personality Isn't Permanent.
Read more >
Why Teams Don't Work - Harvard Business Review
Shockingly, most of the time members don't agree on what the team is supposed to be ... You begin your book Leading Teams...
Read more >
Camera doesn't work in Windows - Microsoft Support
If these steps don't fix your issue, continue to the next steps. Roll back the camera driver. If your camera stopped working after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found