nodejs-mobile / nodejs-mobile-react-native

Node.js for Mobile Apps React Native plugin
https://nodejs-mobile.github.io
MIT License
174 stars 42 forks source link

Importing NPM packages crashes app. #67

Closed sleep9 closed 9 months ago

sleep9 commented 9 months ago

If I import any npm package into main.js it crashes in simulator. Otherwise works fine. This is an ejected expo project. currently only trying to use http and express packages, which I installed into the ./nodejs-assets/nodejs-project directory and the projects package.json. (Not sure where it should go)

I am also using RN-nodeify which I used to get rid of errors (crypto randombytes) that I encountered when installing this package.

sleep9 commented 9 months ago

fixed by using require...

sleep9 commented 9 months ago

Still an issue when linking with libraries as many use ES6 import statements.