Search code examples
node.jsnpmnode-red

Unsupported engine for amqplib@0.4.2 node-red-contrib-amqp#installation


Have the latest node-red installed on Ubuntu 20.04?

Trying to add the node-red-contrib-amqp plugin as described on the GitHub page.

https://github.com/abreits/node-red-contrib-amqp#installation

$ sudo npm install -g node-red-contrib-amqp
npm WARN notsup Unsupported engine for amqplib@0.4.2: wanted: {"node":">=0.8 <6 || ^6"} (current: {"node":"12.19.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: amqplib@0.4.2


$ node --version
v12.19.1
$ npm --version
6.14.8

Solution

  • AMPQ seems no longer supported, at least I was unable to solve the errors in question after some hour or two. You also cannot downgrade to node "node":">=0.8 <6 anymore.

    The issue of your question, amqplib not supported, is open since March 2020.

    This answer to "AMQP working on node-red" from June 2021 in the discourse.nodered forum shows:

    • node-red-contrib-amqp2 hasn't been updated in over 4 years and is probably abandoned
    • node-red-contrib-amqp hasn't been updated in over a year and a half, there are 20 open issues and the author has had no GitHub since December of 2019.

    You might still give it a last try and follow node-red-contrib-amqp-ack 1.1.2 with

    sudo npm install -g node-red-contrib-amqp-ack
    

    instead to get

    enter image description here

    Though in my case, that command threw the same error as your

    sudo npm install -g node-red-contrib-amq
    

    Therefore, consider using MQTT with RabbitMQ and Node-RED instead. MQTT in and MQTT out nodes are built-in in node-red:

    enter image description here