Error Installing 'OpenAPI' Node

Hi, about a month ago the ‘OpenAPI’ nodes that I had installed disappeared from instance inexplicably. Its possible it was right after an update but I can’t be sure.

I was able to re-install OpenAPI, but in the logs it shows this error and does not work:

3/20/2024 8:56:09 PM [warn] [openapi-red/openApi-red] Error: Cannot find module ‘swagger-client’
Require stack:

  • /data/node_modules/.openapi-red-jo6DOd42/src/openApi-red.js
  • /usr/src/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/src/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/src/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/src/node-red/node_modules/node-red/lib/red.js
  • /usr/src/node-red/node_modules/node-red/red.js
    3/20/2024 8:56:09 PM [warn] ------------------------------------------------------

Any ideas? It was working perfectly up until a month ago.

Thanks in advance

I’m also having issues installing. I’m on the FlowFuse cloud and I’m not seeing anything helpful in the install logs:

-----------------------------------------------------------
2024-03-22T15:18:10.173Z Install : openapi-red 1.2.5

2024-03-22T15:18:10.362Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict openapi-red@1.2.5
2024-03-22T15:18:15.462Z [err] npm
2024-03-22T15:18:15.462Z [err]  WARN config production Use `--omit=dev` instead.
2024-03-22T15:19:07.362Z rc=null

The rc=null implies that npm was killed for using too much memory

The npm process has to share memory with the Node-RED instance and a small instance has a 256mb of memory limit.

You can try suspending the instance and restarting it as this will run npm to install nodes before starting the Node-RED process. But is still may exceed the memory limits, in which case you will need to upgrade to a medium instance.

Thanks for the quick response! I tried that with the same result. However, I tried something else; from the instance I went to Settings > Palette and adding the module there. Now the instance won’t start but I got more information from the logs:

3/22/2024 8:31:41 AM  [info]    FlowFuse Light Theme Plugin loaded
3/22/2024 8:31:41 AM  [info]    FlowFuse Dark Theme Plugin loaded
3/22/2024 8:31:42 AM  [info]    FlowFuse Metrics Plugin loaded
3/22/2024 8:31:46 AM  [system]  Node-RED health check: waiting for Node-RED to start
3/22/2024 8:31:53 AM  [warn]    ------------------------------------------------------
3/22/2024 8:31:53 AM  [warn]    [@flowfuse/nr-project-nodes/project-link] Error: Project Link nodes cannot be loaded outside of an FlowFuse EE environment (line:6)
3/22/2024 8:31:53 AM  [warn]    ------------------------------------------------------
3/22/2024 8:31:53 AM  [info]    Settings file  : /data/settings.js
3/22/2024 8:31:53 AM  [info]    Context store  : 'memory' [module=memory]
3/22/2024 8:31:53 AM  [info]    Context store  : 'persistent' [module=custom]
3/22/2024 8:31:53 AM  [system]  Node-RED health check: waiting for Node-RED to start
3/22/2024 8:31:54 AM  [info]    Server now running at http://127.0.0.1:1880/
3/22/2024 8:31:54 AM  [warn]    Encrypted credentials not found
3/22/2024 8:31:54 AM  [info]    Starting flows
3/22/2024 8:31:54 AM  [info]    Started flows
3/22/2024 8:34:07 AM  [info]    Installing module: openapi-red, version: 1.2.5
3/22/2024 8:35:06 AM  [warn]    Installation of module openapi-red failed:
3/22/2024 8:35:06 AM  [warn]    ------------------------------------------
3/22/2024 8:35:06 AM  [warn]    npm WARN config production Use `--omit=dev` instead.

3/22/2024 8:35:06 AM  [warn]    ------------------------------------------
3/22/2024 8:35:06 AM  []        Error: Install failed
3/22/2024 8:35:06 AM  []            at /usr/src/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
3/22/2024 8:35:06 AM  []            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
3/22/2024 8:35:06 AM  [error]   {"status":400}
3/22/2024 8:35:25 AM  [system]  Stopping Node-RED
3/22/2024 8:35:25 AM  [info]    Stopping flows
3/22/2024 8:35:25 AM  [info]    Stopped flows
3/22/2024 8:35:25 AM  [system]  Node-RED exited rc=0 signal=null
3/22/2024 8:35:27 AM  [system]  Loading project settings
3/22/2024 8:35:27 AM  [system]  Updating project dependencies

Can you share the team name please

https://app.flowfuse.com/team/chrisgammell

OK, I’ve just tried to install the openapi node in a clean small instance and it fails as well.

This does strongly imply that it will require a medium sized instance to install this node.

Are you able to verify on a medium instance? I’m currently on the trial and would prefer to focus on my evaluation, not instance issues.

Yep, successful install in a medium instance

1 Like

Hi all,

Thanks for the help on this – makes total sense.

Much appreciated!

-G

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