0
votes

I created a new React Native v 0.42.0 project with the following libraries installed. react-native-ble: 1.0.8 bleat: 0.1.1

In addition to the welcome page. I added the two following lines to load the bleat and noble and an remote android tablet.

var noble = ('noble'); var bleat = require('bleat').classic;

Noble loads correctly, but everytime I try to include the bleat library I get this error.

============================================== The development server returned error code: 500

URL: http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false

Unable to resolve module url from [path]/node_modules/ws/lib/WebSocket.js Module does not exist in the module map or in these directories /node_modules/

===============================

I'm not quite sure how to fix this issue.

1

1 Answers

0
votes

I found my answer to this issue to be inserting this line into my package.js file.

"browser": {
    "noble": "react-native-ble"
}