BiancoRoyal / node-red-contrib-iiot-opcua

deprecated - very new developed by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-iiot-opcua
BSD 3-Clause "New" or "Revised" License
34 stars 8 forks source link

Docker build fails, probably due to deasync #98

Closed echtelerp closed 4 years ago

echtelerp commented 5 years ago

I'm submitting a ... (check one with "x")

Problem

Information

Current behaviour When I try to build a docker container the build fails due to your package.

I used this package.json file: { "name": "node-red-docker", "version": "1.0.0", "description": "A visual tool for wiring the Internet of Things", "homepage": "http://nodered.org", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/node-red/node-red-docker.git" }, "main": "node_modules/node-red/red/red.js", "scripts": { "start": "node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS" }, "contributors": [ { "name": "Dave Conway-Jones" }, { "name": "Nick O'Leary" }, { "name": "James Thomas" } ], "dependencies": { "node-red": "0.20.5", "node-red-node-msgpack": "*", "node-red-node-base64": "*", "node-red-node-suncalc": "*", "node-red-node-random": "*", "node-red-dashboard":"*", "node-red-contrib-iiot-opcua":"*", "node-red-contrib-influxdb":"*", "node-red-contrib-simple-message-queue":"*", "node-red-contrib-s7comm":"*", "node-red-contrib-blockly":"*", "node-red-node-ping":"*", "node-red-contrib-telegrambot":"*" }, "engines": { "node": "8.*.*" } }

If I remove the OPC-UA package, the build succeeds... therefore it breaks because of your package.

I used a custom build node v8.15.0 container, based on a minimal alpine image and with the ARM architecture. (echteler/node:arm32v7) Missing python was at first a problem. I added python, but it still breaks. It seems to have something to do with deasync.

Expected behaviour Build should succeed :-)

biancode commented 5 years ago

@erossignon

echtelerp commented 5 years ago

hi @biancode,

i was able to resolve the issue. I had to add the following packages via pkg add to the node js container: in the docker file add the line: RUN apk add --no-cache python make g++

after that the build succeeded :-)

so I would suggest maybe adding that to the readme file. sort of a make sure: those packages are available in the base container when trying to use the node in a alpine arm based docker image.

have a great weekend philipp

echtelerp commented 5 years ago

i also maybe think, this was actually related to the node-opcua dependency. was quite a pain in the a** to dig into

erossignon commented 5 years ago

@echtelerp @biancode deasync is not used anymore in latest versions of node-opcua (@2.1.4 and @0.7.0 ). This will remove the need of installing the python and compilation tool set

biancode commented 4 years ago

prerelease 3.11.1-4 uses now 0.7.4