'react-native start crashes with error npm[11708]: c:\ws\src\util-inl.h:369: Assertion `!(n > 0) || (ret != nullptr)' failed

I am trying run react-native app. when I run npx react-native start server start, displays react logo and crashes with error

npm[11708]: c:\ws\src\util-inl.h:369: Assertion `!(n > 0) || (ret != nullptr)' failed.

I'm using windows 10.



Solution 1:[1]

Here is what happened. I was using older version of Nodejs and npm. I updated Nodejs to version 16.13.0, and it worked like magic.

Solution 2:[2]

I have the same problem, and trying this does not work for me.

I updated Nodejs to version 16.13.0, and it worked like magic.

But it gave me an idea of how to fix it.

Eventually, I realized I was using the wrong Node.js installation package.

Windows 10 may use the x64 installation package.

  • node-v16.14.2-x64.msi(?)
  • node-v16.14.2-x86.msi(×)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sanjay Kochrekar
Solution 2 Iceli