Installation goes wrong about node-red-contrib-teachable-machine

ello everyone. After installing Node-red-contrib-teachable-machine in node-red, the ERR_DLOPEN_FAILED message appears, as shown in the figure. The program cannot be deployed.
How to solve this problem? I hopesomeone can help me, thanks!
无标题1
无标题2

I see you have already opened an issue against the node. Installation goes wrong about node-red-contrib-teachable-machine · Issue #73 · bonastreyair/node-red-contrib-teachable-machine · GitHub

It would probably be helpful to your issue if you started node-red in a command shell and added to the issue the full output you see as it attempts to start up.

What OS are you using and what version of nodejs ?
Did you try installing manually and make sure any pre reps are installed ?

Hi,dceejay and Colin, I installed this module according to the instructions in the link(node-red-contrib-teachable-machine (node) - Node-RED). There are two ways to install it. I have tried both of them, but they are not working. There is also no mention in the instructions that other modules need to be pre-installed. My OS is 64-bit win10, nodejs is v17.9.1, node-red is v3.02,

That version is not supported. You should be using an LTS version, 14, 16 or 18. Roll back to 16 and see if that helps. In this instance try 16 rather than 18 as 18 is still relatively new.

Also you have not posted the startup log yet. Make the nodejs change first.

In fact, I have tried many versions of nodejs, including V18.13.0, v18.12.1, v17.9.1, v16.13.0, v16.0.0, v12.20.0, also tried to install node-red v3.02 or v2.2 , but this module still does not work properly, even if I change the computer with win11 installed, or on the ipad pro 11 with Node-PAD installed, it still cannot work normally.

You still have not posted the node-red startup log.

Your environment has been set up for using Node.js 16.0.0 (x64) and npm.

C:\Users\lpj66>node-red
3 Feb 19:38:09 - [info]

Welcome to Node-RED

3 Feb 19:38:09 - [info] Node-RED version: v3.0.2
3 Feb 19:38:09 - [info] Node.js version: v16.0.0
3 Feb 19:38:09 - [info] Windows_NT 10.0.19045 x64 LE
3 Feb 19:38:16 - [info] Loading palette nodes
3 Feb 19:38:25 - [warn] ------------------------------------------------------
3 Feb 19:38:26 - [warn] [node-red-contrib-teachable-machine/teachable machine] Error: The specified module could not be found.
\?\C:\Users\lpj66.node-red\node_modules@tensorflow\tfjs-node\lib\napi-v5\tfjs_binding.node
3 Feb 19:38:26 - [warn] ------------------------------------------------------
3 Feb 19:38:26 - [info] Settings file : C:\Users\lpj66.node-red\settings.js
3 Feb 19:38:26 - [info] Context store : 'default' [module=memory]
3 Feb 19:38:26 - [info] User directory : \Users\lpj66.node-red
3 Feb 19:38:26 - [warn] Projects disabled : editorTheme.projects.enabled=false
3 Feb 19:38:26 - [info] Flows file : \Users\lpj66.node-red\flows.json
3 Feb 19:38:26 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

I'm a beginner, thanks for your help.

I appears that the tensorflow module did not install correctly.
Go into your .node-red folder and run
npm remove node-red-contrib-teachable-machine
npm install node-red-contrib-teachable-machine
and post the full output here. When pasting the output use the </> button at the top of the forum entry window.

I have seen similar with my tfjs node - you may need to got to your .node-red directory and

cd ~/.node-red
npm rebuild @tensorflow/tfjs-node --build-from-source

Hi Colin and dceejay,According toColin's suggestion, I used the command
npm install node-red-contrib-teachable-machine
to reinstall the module in the .node-red directory of win10, but it still didn’t work.
According to dceejay’s suggestion, in the node-red directory, The command
npm rebuild @tensorflow/tfjs-node --build-from-source is used in the folder, but it still doesn't work.
This problem has troubled me for a long time, I hope you can continue to help.thanks in advance.

Your environment has been set up for using Node.js 16.0.0 (x64) and npm.

C:\Users\lpj66>cd C:\Users\lpj66\.node-red

C:\Users\lpj66\.node-red>npm rebuild @tensorflow/tfjs-node --build-from-source
rebuilt dependencies successfully

C:\Users\lpj66\.node-red>node-red
3 Feb 22:05:54 - [info]

Welcome to Node-RED
===================

3 Feb 22:05:54 - [info] Node-RED version: v3.0.2
3 Feb 22:05:54 - [info] Node.js  version: v16.0.0
3 Feb 22:05:54 - [info] Windows_NT 10.0.19045 x64 LE
3 Feb 22:05:56 - [info] Loading palette nodes
3 Feb 22:05:59 - [warn] ------------------------------------------------------
3 Feb 22:05:59 - [warn] [node-red-contrib-teachable-machine/teachable machine] Error: The specified module could not be found.
\\?\C:\Users\lpj66\.node-red\node_modules\@tensorflow\tfjs-node\lib\napi-v5\tfjs_binding.node
3 Feb 22:05:59 - [warn] ------------------------------------------------------
3 Feb 22:05:59 - [info] Settings file  : C:\Users\lpj66\.node-red\settings.js
3 Feb 22:05:59 - [info] Context store  : 'default' [module=memory]
3 Feb 22:05:59 - [info] User directory : \Users\lpj66\.node-red
3 Feb 22:05:59 - [warn] Projects disabled : editorTheme.projects.enabled=false
3 Feb 22:05:59 - [info] Flows file     : \Users\lpj66\.node-red\flows.json
3 Feb 22:05:59 - [info] Creating new flow file
3 Feb 22:05:59 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

3 Feb 22:05:59 - [warn] Encrypted credentials not found
3 Feb 22:05:59 - [error] Uncaught Exception:
3 Feb 22:05:59 - [error] Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (node:net:1306:16)
    at listenInCluster (node:net:1354:12)
    at doListen (node:net:1492:7)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)

C:\Users\lpj66\.node-red>

The reason the node-red command did not start is because you already have node-red running, and attempted to start another instance of node-red.

You did not show us the output from the install of the node, as requested.
Did the rebuild from source show any error messages? Possibly best to post that here too.

1 Like

In order to reproduce this phenomenon, I just uninstalled and reinstalled nodejs and node-red. The output of installing the node is as follows:

C:\Users\lpj66>cd C:\Users\lpj66\.node-red

C:\Users\lpj66\.node-red>npm install node-red-contrib-teachable-machine
npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

added 107 packages, and audited 108 packages in 39s

6 packages are looking for funding
  run `npm fund` for details

8 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

C:\Users\lpj66\.node-red>

As Colin noted:

You have to stop/kill node-red first and restart it

After installing, I did restart node-red. Judging from the startup information: the module was not found, and indeed there is a problem with this module. But I don't know how to solve it.

Your environment has been set up for using Node.js 16.0.0 (x64) and npm.

C:\Users\lpj66>node-red
4 Feb 16:56:20 - [info]

Welcome to Node-RED
===================

4 Feb 16:56:20 - [info] Node-RED version: v3.0.2
4 Feb 16:56:20 - [info] Node.js  version: v16.0.0
4 Feb 16:56:20 - [info] Windows_NT 10.0.19045 x64 LE
4 Feb 16:56:22 - [info] Loading palette nodes
4 Feb 16:56:25 - [warn] ------------------------------------------------------
4 Feb 16:56:25 - [warn] [node-red-contrib-teachable-machine/teachable machine] Error: The specified module could not be found.
\\?\C:\Users\lpj66\.node-red\node_modules\@tensorflow\tfjs-node\lib\napi-v5\tfjs_binding.node
4 Feb 16:56:25 - [warn] ------------------------------------------------------
4 Feb 16:56:25 - [info] Settings file  : C:\Users\lpj66\.node-red\settings.js
4 Feb 16:56:25 - [info] Context store  : 'default' [module=memory]
4 Feb 16:56:25 - [info] User directory : \Users\lpj66\.node-red
4 Feb 16:56:25 - [warn] Projects disabled : editorTheme.projects.enabled=false
4 Feb 16:56:25 - [info] Flows file     : \Users\lpj66\.node-red\flows.json
4 Feb 16:56:25 - [info] Creating new flow file
4 Feb 16:56:25 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

4 Feb 16:56:25 - [warn] Encrypted credentials not found
4 Feb 16:56:25 - [info] Server now running at http://127.0.0.1:1880/
4 Feb 16:56:25 - [info] Starting flows
4 Feb 16:56:25 - [info] Started flows

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.