Dong Lam Trien

Dong Lam Trien

  • 732
  • 986
  • 147.4k

Can Nodejs code run in React Native ?

Apr 8 2024 8:12 AM
var express = require('express');
var app = express();
var sql = require("mssql");

I declare the above library in React Native when running the error:

Android Bundling failed 3690ms (D:\demo\node_modules\expo\AppEntry.js)

The package at "node_modules\mssql\lib\base\connection-pool.js" attempted to import the Node standard library module "node:events".

It failed because the native React runtime does not include the Node standard library.


Answers (4)