abreits / node-red-contrib-amqp

Node-RED AMQP input and output nodes
16 stars 18 forks source link

[warn] [amqp] TypeError: Object #<Object> has no method 'parse' #1

Closed phillipsnick closed 8 years ago

phillipsnick commented 8 years ago

Getting this on startup, not too sure how to debug it further?

"dependencies": {
    "node-red": "^0.13.0",
    "node-red-contrib-amqp": "^0.4.2"
}
pat1 commented 8 years ago

Confirm I get the same error.

node-red -v

Welcome to Node-RED

21 Jan 10:47:11 - [info] Node-RED version: v0.13.0 21 Jan 10:47:11 - [info] Node.js version: v0.10.33 21 Jan 10:47:11 - [info] Loading palette nodes 21 Jan 10:47:14 - [warn] ------------------------------------------ 21 Jan 10:47:14 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node 21 Jan 10:47:14 - [warn] [amqp] TypeError: Object # has no method 'parse' 21 Jan 10:47:14 - [warn] ------------------------------------------

abreits commented 8 years ago

I am looking into the issue now,

I did the following:

  • started a new project:
    • create a package.json with the above content
    • do a npm install
    • go to the node-red folder in the node_modules (to make sure I use the local version of node-red)
    • execute node-red -v I get the following result:
Welcome to Node-RED
===================

22 Jan 07:17:53 - [info] Node-RED version: v0.13.1
22 Jan 07:17:53 - [info] Node.js  version: v5.4.1
22 Jan 07:17:53 - [info] Loading palette nodes
22 Jan 07:17:54 - [warn] ------------------------------------------
22 Jan 07:17:54 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
22 Jan 07:17:54 - [warn] [tail] Not currently supported on Windows.
22 Jan 07:17:54 - [warn] ------------------------------------------

I am using node.js version 5.4.1 (as you can see). I think I have found the source of the warning: in the amqp-ts library I use the parse method of the node.js path library. path.parse(...) does not exist in node.js version 0.10.x and generates a warning in node-red.

I have updated the amqp-ts library to only use path.parse(..) if it exists.

pat1 commented 8 years ago

Solved for me. Thanks