Giter Site home page Giter Site logo

node-keyboard-input's Introduction

node-keyboard-input

This is an example of bringing input from a physical keyboard into your balena project.

The application will run a web server on port 80 that prints the input received from the keyboard in real time using socket.io.

Note: the vendor and product IDs specified in server.js will need to be updated to match that of your own hardware in order for the driver to know which device to open. You can do this by setting environment variables for the application or device called VENDOR_ID and PRODUCT_ID, where the values are hex string (eg. 12ab).

node-keyboard-input's People

Contributors

chrisys avatar hedss avatar ramirogm avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rockyyyr

node-keyboard-input's Issues

Build failed

Unfortunately the build does not run through. At this step the build failed (development mode).

[main]      ---> 9712deb84257
[main]     Step 5/9 : RUN JOBS=MAX npm install -g node-gyp
[main]      ---> Running in bc61d54a3bb2
[main]     npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
[main]     
[main]     npm WARN deprecated [email protected]: this library is no longer supported
[main]     
[main]     /usr/local/bin/node-gyp -> /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
[main]     + [email protected]
[main]     added 96 packages from 66 contributors in 5.272s
[main]     npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">= 10.12.0"} (current: {"node":"8.17.0","npm":"6.13.4"})
[main]     npm WARN notsup Not compatible with your version of node/npm: [email protected]
[main]     npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"})
[main]     npm WARN notsup Not compatible with your version of node/npm: [email protected]
[main]     npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">= 10"} (current: {"node":"8.17.0","npm":"6.13.4"})
[main]     npm WARN notsup Not compatible with your version of node/npm: [email protected]
[main]     npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"})
[main]     npm WARN notsup Not compatible with your version of node/npm: [email protected]
[main]     npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"})
[main]     npm WARN notsup Not compatible with your version of node/npm: [email protected]
[main]     
[main]     Removing intermediate container bc61d54a3bb2
[main]      ---> bed49e531090
[main]     Step 6/9 : RUN JOBS=MAX npm install node-hid --build-from-source
[main]      ---> Running in 892aedd4141f
[main]     > [email protected] install /usr/src/app/node_modules/node-hid
[main]     > prebuild-install || node-gyp rebuild
[main]     /bin/sh: 1: pkg-config: not found
[main]     gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
[main]     gyp ERR! configure error 
[main]     gyp ERR! stack Error: `gyp` failed with exit code: 1
[main]     gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
[main]     gyp ERR! stack     at emitTwo (events.js:126:13)
[main]     gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
[main]     gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
[main]     gyp ERR! System Linux 4.15.0-45-generic
[main]     gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
[main]     gyp ERR! cwd /usr/src/app/node_modules/node-hid
[main]     gyp ERR! node -v v8.17.0
[main]     gyp ERR! node-gyp -v v5.0.5
[main]     gyp ERR! not ok 
[main]     
[main]     npm WARN [email protected] No description
[main]     npm WARN [email protected] No repository field.
[main]     npm ERR! code ELIFECYCLE
[main]     npm ERR! errno 1
[main]     npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
[main]     npm ERR! Exit status 1
[main]     npm ERR! 
[main]     npm ERR! Failed at the [email protected] install script.
[main]     npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[main]     npm ERR! A complete log of this run can be found in:
[main]     npm ERR!     /root/.npm/_logs/2020-10-16T15_47_01_813Z-debug.log
[main]     
[main]     Removing intermediate container 892aedd4141f
[main]     The command '/bin/sh -c JOBS=MAX npm install node-hid --build-from-source' returned a non-zero code: 1
[Info]     Uploading images
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: The command '/bin/sh -c JOBS=MAX npm install node-hid --build-from-source' returned a non-zero code: 1
[Info]     Built on arm03
[Error]    Not deploying release.
Remote build failed

Fails to fetch packages

main]     Step 1/9 : FROM resin/raspberrypi3-node:6-slim
[main]      ---> 484f6d2ab09f
[main]     Step 2/9 : RUN apt-get update && apt-get install -yq     python build-essential libusb-1.0-0-dev     libudev-dev &&     apt-get clean && rm -rf /var/lib/apt/lists/*
[main]      ---> Running in 8ecdce4a1652
[main]     Get:1 http://archive.raspbian.org jessie InRelease [15.0 kB]
[main]     Get:2 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
[main]     Get:3 http://security.debian.org jessie/updates InRelease [44.9 kB]
[main]     Ign http://deb.debian.org jessie InRelease
[main]     Get:4 http://deb.debian.org jessie-updates InRelease [7340 B]
[main]     Get:5 http://deb.debian.org jessie Release.gpg [2420 B]
[main]     Get:6 http://deb.debian.org jessie Release [148 kB]
[main]     Get:7 http://archive.raspbian.org jessie/main armhf Packages [13.3 MB]
[main]     Get:8 http://archive.raspbian.org jessie/contrib armhf Packages [49.5 kB]
[main]     Get:9 http://archive.raspberrypi.org jessie/main armhf Packages [170 kB]
[main]     Get:10 http://archive.raspbian.org jessie/non-free armhf Packages [106 kB]
[main]     Get:11 http://archive.raspbian.org jessie/rpi armhf Packages [1297 B]
[main]     Get:12 http://archive.raspbian.org jessie/firmware armhf Packages [1208 B]
[main]     Get:13 http://security.debian.org jessie/updates/main armhf Packages [820 kB]
[main]     Get:14 http://deb.debian.org jessie/main armhf Packages [8898 kB]
[main]     Fetched 23.6 MB in 14s (1685 kB/s)
[main]     W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)
[main]     E: Some index files failed to download. They have been ignored, or old ones used instead.
[main]
[main]     Removing intermediate container 8ecdce4a1652
[Info]     Uploading images
[main]     The command '/bin/sh -c apt-get update && apt-get install -yq     python build-essential libusb-1.0-0-dev     libudev-dev &&     apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: The command '/bin/sh -c apt-get update && apt-get install -yq     python build-essential libusb-1.0-0-dev     libudev-dev &&     apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
[Error]    Not deploying release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.