This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pc-ble-driver-js test code dfu.js with electron module error

Hello I am trying to make an electron application which is based from the 'pc-ble-driver-js' module for testing pupose for production development with nordic product

I am using NRF52 Development kit to do DFU to other device. When I run 'node dfu.js <mac_address> <path_fw_zip_file>'

it runs fine and do DFU perfectly when I am in 'pc-ble-driver-js' folder.

I change package.json:

"main": "main.js",

"scripts": { "start": "electron ." }

"devDependencies": { "electron": "1.4.15" }

and so

main.js : https://gist.github.com/InKyu0317/e82ae11f2a5375e28d05f0a44914444a

index.html: https://gist.github.com/InKyu0317/f969aadad6ea78a9eeec21fccebfafde

^ this do require(dfu.js) in script tag, maybe this occur the problem

dfu.js: https://gist.github.com/InKyu0317/1231d419488a5c437ed36a2ed3e4fedc

^ .index .setup file are given from the original 'pc-ble-driver-js' code

error:

This is the error I get when I do 'npm start' to run the app.

If anyone had same problem or know why it happens, please give some suggestion or solution if it is okay.

Thank you all of you reading my question.

Parents Reply Children
No Data
Related