metachris / RPIO

RPIO is a GPIO toolbox for the Raspberry Pi.
https://pypi.python.org/pypi/RPIO
GNU Lesser General Public License v3.0
331 stars 147 forks source link

Uncaught Error: Cannot find 'rpio' #115

Open lorenzwinkler1 opened 5 years ago

lorenzwinkler1 commented 5 years ago

Instal rpio via node on my windows machine and i am using it in an electron application. When running it on my raspberry pi 3 model b the developer console writes Uncaught Error: Cannot find module 'rpio'.

I have tried building the application using electron-builder with asar enabled and electron-builder without asar.

My code in a nutshell is: var rpio = require('rpio'); in a file (not the main.js file) in my project's root.

package.json:

{ "name": "myname", "version": "1.0.0", "description": "", "main": "main.js", "build": { "asar": false, "appId": "", "mac": { "category": "public.app-category.utilities", "target": [ "zip", "dmg" ] }, "linux": { "target": [ "snap" ] }, "nsis": { "perMachine": true }, "extends": null }, "scripts": { "build": "tsc", "watch": "tsc -w", "lint": "tslint -c tslint.json -p tsconfig.json", "start": "npm run build && electron main.js", "pack": "electron-builder --dir", "dist": "electron-builder", "distlnxarm": "electron-builder --linux --armv7l", "packlnxarm": "electron-builder --dir --arm64 --linux", "elpackagerlnxarm":"electron-packager . pacman_htlball --platform=linux --arch=armv7l" }, "repository": "https://github.com/electron/electron-quick-start-typescript", "keywords": [ "Electron", "quick", "start", "tutorial", "demo", "typescript" ], "author": "Lorenzw", "license": "CC0-1.0", "devDependencies": { "electron": "^6.0.8", "electron-builder": "^21.2.0", "tslint": "^5.19.0", "typescript": "^3.6.0" }, "dependencies": { "node-gyp": "^6.0.0" } }