IgnitionModuleDevelopmentCommunity / IgnitionNode-RED

Adds support for Node-RED
Apache License 2.0
30 stars 7 forks source link

New Node Red Install #15

Closed tbackus closed 3 years ago

tbackus commented 3 years ago

New Node Red Install using this newly updated 1.5.8 version and getting this error: Flows stopped due to missing node types.

ignition-server ignition-tag-write

Looking at Manage Pallet at installed nodes: node-red-contrib-ignition-nodes 1.5.8 MODULE_NOT_FOUND

ignition-tag-read ignition-tag-write ignition-tag-read-ws ignition-tag-browse ignition-server

ignition-server is the only one that is not checked. I have installed the Module in Ignition (it's being used with a different node red install) and verified the API string and key (again with the other node red install)..

The older working node red install is version 1.5.7

iatraviscox commented 3 years ago

What version of NodeRED do you have?

tbackus commented 3 years ago

2.0.5

iatraviscox commented 3 years ago

Can you look at the NodeRED console logs to see what the error is? I tried on an older version that didn't have the ws javascript library and saw this error:

[node-red-contrib-ignition-nodes/ignition-nodes] Error: Cannot find module 'ws'

Do you have the same thing?

tbackus commented 3 years ago

I set console logging level to Debug and still just get the following...

Also one other thing I just noticed, when I go in to put the API Token and Secret, those fields are empty and box outline is red. Using the same key that I am using on the older version with no issues (cut and paste). Even though I put the appropriate things in the fields, and save it and Deploy, I get the same errors "Flows stopped due to missing node types"

iatraviscox commented 3 years ago

I think it has to do with the same error I mentioned. Basically, I assume various dependencies are already there like the ws package. It seems it is not there by default. If you can SSH into the NodeRED server you can definitely install them with:

npm install ws

I think I need to force the dependency in my package.json. I will get that done shortly.

tbackus commented 3 years ago

Thanks. I did get a few more dependency errors trying to install ws, but it did install and I started node red again and was able to set the API and Secret and it stayed.

tbackus commented 3 years ago

Something else has cropped up now... "Incorrect format for JSON POST data: {"defaultTagProvider":"default","apiToken":"xx","values":["1755"],"tagPaths":["[default]ANA_Test/reTerminal01/Cycle TimeMS"],"secret":"xx","command":"tagWrite"}"

The value is time in ms going into an Integer tag in Ignition....

Here is a copy of the dependency Errors I mentioned earlier in case that is a cause of the current issue:

pi@raspberrypi:~/.node-red $ npm install ws

keytar@7.7.0 install /home/pi/.node-red/node_modules/keytar prebuild-install || npm run build

prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm libc= platform=linux)

keytar@7.7.0 build /home/pi/.node-red/node_modules/keytar node-gyp rebuild

Package libsecret-1 was not found in the pkg-config search path. Perhaps you should add the directory containing libsecret-1.pc' to the PKG_CONFIG_PATH environment variable No package 'libsecret-1' found gyp: Call to 'pkg-config --libs-only-l libsecret-1' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error:gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:400:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Linux 5.10.52-v7l+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/.node-red/node_modules/keytar gyp ERR! node -v v14.17.5 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! keytar@7.7.0 build:node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the keytar@7.7.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2021-08-20T14_22_54_879Z-debug.log npm WARN optional SKIPPING OPTIONAL DEPENDENCY: keytar@7.7.0 (node_modules/keytar): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: keytar@7.7.0 install: prebuild-install || npm run build npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

35 packages are looking for funding run npm fund for details

found 2 moderate severity vulnerabilities run npm audit fix to fix them, or npm audit for details

iatraviscox commented 3 years ago

I uploaded a new version this morning that takes care of the dependencies. For the error, you need version 1.5.8+ for the NodeRED module in Ignition.