Unsupported engine

Using NodeRed 3.x.x up to 3.1.10, NodeJS 20, Windows and Ubuntu, I receive this warning when I try to upgrade nodes :

image

Is not a node-red-node-email error, this is for almost (maybe) all nodes. I think, this error is related to node-red-contrib-mssql-plus

Another case, using NodeJS 16.20.2. If I try to upgrade email node from NodeRed
I got error:

2024-06-17T12:49:00.134Z Install : node-red-node-email 3.0.0
2024-06-17T12:49:00.578Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@3.0.0
2024-06-17T12:49:01.701Z [err] npm
2024-06-17T12:49:01.702Z [err] WARN config production Use `--omit=dev` instead.
2024-06-17T12:49:03.552Z [err] npm
2024-06-17T12:49:03.552Z [err] ERR! code EBADENGINE
2024-06-17T12:49:03.554Z [err] npm ERR! engine
2024-06-17T12:49:03.554Z [err] Unsupported engine
2024-06-17T12:49:03.554Z [err] npm ERR!
2024-06-17T12:49:03.554Z [err] engine Not compatible with your version of node/npm: node-red-node-email@3.0.0
2024-06-17T12:49:03.554Z [err] npm ERR! notsup Not compatible with your version of node/npm: node-red-node-email@3.0.0
2024-06-17T12:49:03.554Z [err] npm ERR! notsup
2024-06-17T12:49:03.554Z [err] Required: {"node":">=18.0.0"}
2024-06-17T12:49:03.554Z [err] npm ERR! notsup Actual: {"npm":"9.6.6","node":"v16.20.2"}

Try downgrading nodejs to 18.

I think not. The clue is in the error. In future please post logs as text rather than a screenshot, that would have enabled me to quote the important line.
The third line tells you that the azure package does not like nodejs 20. You should file an issue on the node's github page.

This is already reported against the mssql-plus module: Not supporting NodeJS v20.14.0 LTS · Issue #97 · bestlong/node-red-contrib-mssql-plus · GitHub

Oh, I see that the @azure package is used by mssql-plus, so I stand corrected.

I have reported various problems, unfortunately without an answer, after many months. There are probably other priorities...

@softy2k

The warnings you are seeing are probably due to a combination of order of events + timing (there was a period where MSSQL (child dependency) and tedious (great grandchild dependency) supported Node 20 but a great-great-great-grandchild azure dependency did not (or something along those lines)

mssql-plus is fully functional on node 20 and has been for some time. I am not on a computer so cant easily hunt down the issues or start digging etc, but it is there somewhere (Im sure :thinking:)

You probably just need to remove/re-install the node so that the sub dependencies are updated according to semver rules.

what does npm list @azure/msal-node show?

Raspberry PI:

pi@raspberrypi:~/.node-red $ npm list @azure/msal-node
node-red-project@0.0.1 /home/pi/.node-red
└─┬ node-red-contrib-mssql-plus@0.12.2
  └─┬ mssql@10.0.2
    └─┬ tedious@16.7.1
      └─┬ @azure/identity@3.4.2
        └── @azure/msal-node@2.8.1

Windows Server and Ubuntu:

C:\Administrator\.node-red>npm list @azure/msal-node
node-red-project@0.0.1 C:\Administrator\.node-red
`-- node-red-contrib-mssql-plus@0.12.2
  `-- mssql@10.0.1
    `-- tedious@16.4.0
      `-- @azure/identity@2.1.0
        `-- @azure/msal-node@1.18.3

Another Ubuntu (Oracle) :

image

And error:

2024-06-17T21:48:12.539Z Install : node-red-node-email 3.0.0
2024-06-17T21:48:13.230Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@3.0.0
2024-06-17T21:48:13.739Z [err] npm warn config production Use `--omit=dev` instead.
2024-06-17T21:48:16.637Z [err] npm error code EBADENGINE
2024-06-17T21:48:16.637Z [err] npm error engine Unsupported engine
2024-06-17T21:48:16.637Z [err] npm error engine Not compatible with your version of node/npm: @azure/msal-node@1.18.3
2024-06-17T21:48:16.637Z [err] npm error notsup Not compatible with your version of node/npm: @azure/msal-node@1.18.3
2024-06-17T21:48:16.637Z [err] npm error notsup Required: {"node":"10 || 12 || 14 || 16 || 18"}
2024-06-17T21:48:16.637Z [err] npm error notsup Actual: {"npm":"10.8.1","node":"v20.14.0"}
2024-06-17T21:48:16.640Z [err] npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2024-06-17T21_48_13_549Z-debug-0.log
2024-06-17T21:48:16.651Z rc=1

Could you, in this order, run:

  1. npm remove node-red-contrib-mssql-plus
  2. npm list @azure/msal-node
  3. npm install node-red-contrib-mssql-plus@latest
  4. npm list @azure/msal-node

And show me what you see?

(Obviously not necessary on the raspberry pi as that has the up to date Azure dependency)

1 Like

After remove:

D:\NodeRed\> npm list @azure/msal-node
NodeRed@0.0.1 D:\NodeRed\
`-- (empty)

After reinstall:

D:\NodeRed\> npm list @azure/msal-node
NodeRed@0.0.1 D:\NodeRed\
`-- node-red-contrib-mssql-plus@0.12.2
  `-- mssql@10.0.2
    `-- tedious@16.7.1
      `-- @azure/identity@3.4.2
        `-- @azure/msal-node@2.9.2

No error on installing email node after updates. In the evening, I also test on the other servers (I can't stop the servers now)

Is working on Ubuntu (Oracle), no errors.

Would npm outdated and npm update have corrected this issue?

Possibly, but not sure. Mostly I wanted to see the before and after.

npm outdated it doesn't show anything about msal-node
npm update has the same result as npm install node-red-contrib-mssql-plus@latest (at least in my case)

Have you still got a failing system that you ran this on? I would have expected outdated to say that mssql could be updated from 10.0.1 to 10.0.2

npm outdated returned nothing, as if all packages were already updated.
Later, I will update on another Windows Server, and I will post the logs

Another example, Ubuntu, NodeJS 20

ubuntu@ip-x-x-x-x:~/.node-red$ npm outdate

ubuntu@ip-x-x-x-x:~/.node-red$ npm list @azure/msal-node
node-red-project@0.0.1 /home/ubuntu/.node-red
└─┬ node-red-contrib-mssql-plus@0.12.2
  └─┬ mssql@10.0.1
    └─┬ tedious@16.4.1
      └─┬ @azure/identity@2.1.0
        └── @azure/msal-node@1.18.3

ubuntu@ip-x-x-x-x:~/.node-red$ npm update

added 20 packages, removed 14 packages, changed 65 packages, and audited 174 packages in 30s
61 packages are looking for funding
  run `npm fund` for details
4 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.


ubuntu@ip-x-x-x-x:~/.node-red$ npm list @azure/msal-node

node-red-project@0.0.1 /home/ubuntu/.node-red
└─┬ node-red-contrib-mssql-plus@0.12.2
  └─┬ mssql@10.0.4
    └─┬ tedious@16.7.1
      └─┬ @azure/identity@3.4.2
        └── @azure/msal-node@2.9.2

So npm update does update the children modules.

Good info.

Thanks for letting everyone know.

Yes, tested with NodeJS 16 and NodeJS 20, Windows Server, Windows, and Ubuntu