# MySql nodes compatible with node.js 20?

**URL:** <https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910>\
**Category:** General\
**Tags:** mysql\
**Created:** [15 December 2024 11:31 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910 "2024-12-15T11:31:44Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike-FUT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike-fut/32/50736_2.png) [@Mike-FUT](https://discourse.nodered.org/u/Mike-FUT)\
**Post date:** [15 December 2024 11:31 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/1 "2024-12-15T11:31:44Z")

</div>

Hi All,

I'd like to run select/insert/update MySQL queries via Node-RED.  
I'm using Node-RED 4.0.5 alsong with the recommended node.js version 20.

I tried installing those packages:  
node-red-mysql-r2  
node-red-node-mysql

But both packages fail installing with the same error message:  
[err] npm error code EBADENGINE  
[err] npm error engine Unsupported engine  
[err] npm error notsup Not compatible with your version of node/npm: @azure/msal-node@1.18.3  
[err] npm error notsup Required: {"node":"10 || 12 || 14 || 16 || 18"}  
[err] npm error notsup Actual: {"npm":"10.8.2","node":"v20.18.1"}

Does anyone of you happen to know a MySQL package compatible with the recommended node version 20?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [15 December 2024 11:49 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/2 "2024-12-15T11:49:14Z")

</div>

I don't think that is anything to do with those Nodes.

the Nodes (and their dependencies), make no reference to that module.

```auto
marcusdavies@ /Users/marcusdavies
├─┬ node-red-mysql-r2@1.3.0
│ └─┬ mysql@2.18.1
│ ├── bignumber.js@9.0.0
│ ├─┬ readable-stream@2.3.7
│ │ ├── core-util-is@1.0.3
│ │ ├── inherits@2.0.4
│ │ ├── isarray@1.0.0
│ │ ├── process-nextick-args@2.0.1
│ │ ├── safe-buffer@5.1.2 deduped
│ │ ├─┬ string_decoder@1.1.1
│ │ │ └── safe-buffer@5.1.2 deduped
│ │ └── util-deprecate@1.0.2
│ ├── safe-buffer@5.1.2
│ └── sqlstring@2.3.1
└─┬ node-red-node-mysql@2.0.0
  └─┬ mysql2@3.11.5
    ├── aws-ssl-profiles@1.1.2
    ├── denque@2.1.0
    ├─┬ generate-function@2.3.1
    │ └── is-property@1.0.2
    ├─┬ iconv-lite@0.6.3
    │ └── safer-buffer@2.1.2
    ├── long@5.2.3
    ├── lru.min@1.1.1
    ├─┬ named-placeholders@1.1.3
    │ └── lru-cache@7.18.3
    ├── seq-queue@0.0.5
    └── sqlstring@2.3.3

```

You have something else causing that error.

- Check your Node RED `package.json` file.
- Run `npm ls @azure/msal-node` under your .node-red directory.

You have something trying to use it - its not the nodes you listed,

`node-red-node-mysql` - is the one to use BTW

**EDIT**

* * *

I think you have installed `node-red-contrib-mssql-plus` - which does use it.

```auto
marcusdavies@ /Users/marcusdavies
└─┬ 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.16.2

```

**MySQL** is not **MsSQL**  
**MsSQL** is not **MySQL**

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [15 December 2024 14:41 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/3 "2024-12-15T14:41:27Z")

</div>

> **[node-red-node-mysql](https://flows.nodered.org/node/node-red-node-mysql)**
>
> A Node-RED node to read and write to a MySQL database

Been using this for quite some years now, without any issue with all recent versions of node-red.

---

<div class="post-metadata">

**Author:** ![Mike-FUT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike-fut/32/50736_2.png) [@Mike-FUT](https://discourse.nodered.org/u/Mike-FUT)\
**Post date:** [15 December 2024 15:55 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/4 "2024-12-15T15:55:11Z")

</div>

Thank you both!

@marcus-j-davies,  
Yes, I do use node-red-contrib-mssql-plus.

I'm sorry, if that is a stupid question, but when I'm trying to install node-red-node-mysql and this node-red-node-mysql package is not related to @azure/msal-node@1.18.3, how is it possible that this comes up with an error message and stops installing?

This is the full message (the one before was shortened):

```auto
2024-12-15T15:45:40.781Z Install : node-red-node-mysql 2.0.0

2024-12-15T15:45:39.687Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict node-red-node-mysql@2.0.0
2024-12-15T15:45:41.174Z [err] npm error code EBADENGINE
2024-12-15T15:45:41.174Z [err] npm error engine Unsupported engine
2024-12-15T15:45:41.175Z [err] npm error engine Not compatible with your version of node/npm: @azure/msal-node@1.18.3
2024-12-15T15:45:41.175Z [err] npm error notsup Not compatible with your version of node/npm: @azure/msal-node@1.18.3
2024-12-15T15:45:41.175Z [err] npm error notsup Required: {"node":"10 || 12 || 14 || 16 || 18"}
2024-12-15T15:45:41.175Z [err] npm error notsup Actual: {"npm":"10.8.2","node":"v20.18.1"}
2024-12-15T15:45:41.176Z [err] npm error A complete log of this run can be found in: /home/nr-user/.npm/_logs/2024-12-15T15_45_39_753Z-debug-0.log
2024-12-15T15:45:41.186Z rc=1

```

This is the contents of /home/nr-user/.npm/\_logs/2024-12-15T15\_45\_39\_753Z-debug-0.log

```auto
0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@10.8.2
2 info using node@v20.18.1
3 silly config load:file:/usr/lib/node_modules/npm/npmrc
4 silly config load:file:/home/nr-user/.node-red/.npmrc
5 silly config load:file:/home/nr-user/.npmrc
6 silly config load:file:/usr/etc/npmrc
7 verbose title npm install node-red-node-mysql@2.0.0
8 verbose argv "install" "--no-audit" "--no-update-notifier" "--no-fund" "--save" "--save-prefix" "~" "--omit" "dev" "--engine-strict" "node-red-node-mysql@2.0.0"
9 verbose logfile logs-max:10 dir:/home/nr-user/.npm/_logs/2024-12-15T15_45_39_753Z-
10 verbose logfile /home/nr-user/.npm/_logs/2024-12-15T15_45_39_753Z-debug-0.log
11 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
12 silly logfile done cleaning log files
13 silly idealTree buildDeps
14 silly fetch manifest node-red-node-mysql@2.0.0
15 silly packumentCache full:https://registry.npmjs.org/node-red-node-mysql cache-miss
16 http fetch GET 200 https://registry.npmjs.org/node-red-node-mysql 369ms (cache revalidated)
17 silly packumentCache full:https://registry.npmjs.org/node-red-node-mysql set size:100960 disposed:false
18 silly placeDep ROOT node-red-node-mysql@2.0.0 OK for: node-red-project@0.0.1 want: 2.0.0
19 silly fetch manifest mysql2@^3.6.5
20 silly packumentCache full:https://registry.npmjs.org/mysql2 cache-miss
21 http fetch GET 200 https://registry.npmjs.org/mysql2 47ms (cache revalidated)
22 silly packumentCache full:https://registry.npmjs.org/mysql2 set size:494581 disposed:false
23 silly placeDep ROOT mysql2@3.11.5 OK for: node-red-node-mysql@2.0.0 want: ^3.6.5
24 silly fetch manifest long@^5.2.1
25 silly packumentCache full:https://registry.npmjs.org/long cache-miss
26 http fetch GET 200 https://registry.npmjs.org/long 44ms (cache revalidated)
27 silly packumentCache full:https://registry.npmjs.org/long set size:71148 disposed:false
28 silly fetch manifest denque@^2.1.0
29 silly packumentCache full:https://registry.npmjs.org/denque cache-miss
30 http fetch GET 200 https://registry.npmjs.org/denque 50ms (cache revalidated)
31 silly packumentCache full:https://registry.npmjs.org/denque set size:62908 disposed:false
32 silly fetch manifest lru.min@^1.0.0
33 silly packumentCache full:https://registry.npmjs.org/lru.min cache-miss
34 http fetch GET 200 https://registry.npmjs.org/lru.min 64ms (cache revalidated)
35 silly packumentCache full:https://registry.npmjs.org/lru.min set size:42329 disposed:false
36 silly fetch manifest seq-queue@^0.0.5
37 silly packumentCache full:https://registry.npmjs.org/seq-queue cache-miss
38 http fetch GET 200 https://registry.npmjs.org/seq-queue 42ms (cache revalidated)
39 silly packumentCache full:https://registry.npmjs.org/seq-queue set size:10958 disposed:false
40 silly fetch manifest sqlstring@^2.3.2
41 silly packumentCache full:https://registry.npmjs.org/sqlstring cache-miss
42 http fetch GET 200 https://registry.npmjs.org/sqlstring 53ms (cache revalidated)
43 silly packumentCache full:https://registry.npmjs.org/sqlstring set size:31678 disposed:false
44 silly fetch manifest aws-ssl-profiles@^1.1.1
45 silly packumentCache full:https://registry.npmjs.org/aws-ssl-profiles cache-miss
46 http fetch GET 200 https://registry.npmjs.org/aws-ssl-profiles 65ms (cache revalidated)
47 silly packumentCache full:https://registry.npmjs.org/aws-ssl-profiles set size:13721 disposed:false
48 silly fetch manifest generate-function@^2.3.1
49 silly packumentCache full:https://registry.npmjs.org/generate-function cache-miss
50 http fetch GET 200 https://registry.npmjs.org/generate-function 43ms (cache revalidated)
51 silly packumentCache full:https://registry.npmjs.org/generate-function set size:22290 disposed:false
52 silly fetch manifest named-placeholders@^1.1.3
53 silly packumentCache full:https://registry.npmjs.org/named-placeholders cache-miss
54 http fetch GET 200 https://registry.npmjs.org/named-placeholders 51ms (cache revalidated)
55 silly packumentCache full:https://registry.npmjs.org/named-placeholders set size:17099 disposed:false
56 silly placeDep ROOT aws-ssl-profiles@1.1.2 OK for: mysql2@3.11.5 want: ^1.1.1
57 silly placeDep ROOT denque@2.1.0 OK for: mysql2@3.11.5 want: ^2.1.0
58 silly placeDep ROOT generate-function@2.3.1 OK for: mysql2@3.11.5 want: ^2.3.1
59 silly placeDep ROOT long@5.2.3 OK for: mysql2@3.11.5 want: ^5.2.1
60 silly placeDep ROOT lru.min@1.1.1 OK for: mysql2@3.11.5 want: ^1.0.0
61 silly placeDep ROOT named-placeholders@1.1.3 OK for: mysql2@3.11.5 want: ^1.1.3
62 silly placeDep ROOT seq-queue@0.0.5 OK for: mysql2@3.11.5 want: ^0.0.5
63 silly placeDep ROOT sqlstring@2.3.3 OK for: mysql2@3.11.5 want: ^2.3.2
64 silly fetch manifest is-property@^1.0.2
65 silly packumentCache full:https://registry.npmjs.org/is-property cache-miss
66 http fetch GET 200 https://registry.npmjs.org/is-property 59ms (cache revalidated)
67 silly packumentCache full:https://registry.npmjs.org/is-property set size:6745 disposed:false
68 silly fetch manifest lru-cache@^7.14.1
69 silly packumentCache full:https://registry.npmjs.org/lru-cache cache-miss
70 http fetch GET 200 https://registry.npmjs.org/lru-cache 43ms (cache revalidated)
71 silly packumentCache full:https://registry.npmjs.org/lru-cache set size:387720 disposed:false
72 silly placeDep ROOT is-property@1.0.2 OK for: generate-function@2.3.1 want: ^1.0.2
73 silly placeDep node_modules/named-placeholders lru-cache@7.18.3 OK for: named-placeholders@1.1.3 want: ^7.14.1
74 verbose stack Error: Unsupported engine
74 verbose stack at checkEngine (/usr/lib/node_modules/npm/node_modules/npm-install-checks/lib/index.js:14:25)
74 verbose stack at #checkEngineAndPlatform (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:198:11)
74 verbose stack at Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:184:41)
74 verbose stack at async Promise.all (index 1)
74 verbose stack at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
74 verbose stack at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:150:5)
74 verbose stack at async Npm.exec (/usr/lib/node_modules/npm/lib/npm.js:207:9)
74 verbose stack at async module.exports (/usr/lib/node_modules/npm/lib/cli/entry.js:74:5)
75 verbose pkgid @azure/msal-node@1.18.3
76 error code EBADENGINE
77 error engine Unsupported engine
78 error engine Not compatible with your version of node/npm: @azure/msal-node@1.18.3
79 error notsup Not compatible with your version of node/npm: @azure/msal-node@1.18.3
79 error notsup Required: {"node":"10 || 12 || 14 || 16 || 18"}
79 error notsup Actual: {"npm":"10.8.2","node":"v20.18.1"}
80 silly unfinished npm timer reify 1734277539971
81 silly unfinished npm timer reify:loadTrees 1734277539973
82 verbose cwd /home/nr-user/.node-red
83 verbose os Linux 5.4.0-196-generic
84 verbose node v20.18.1
85 verbose npm v10.8.2
86 verbose exit 1
87 verbose code 1
88 error A complete log of this run can be found in: /home/nr-user/.npm/_logs/2024-12-15T15_45_39_753Z-debug-0.log

```

The output you requested ( npm ls @azure/msal-node):

```auto
nr-user@sb-srv002:/home/nr-user/.node-red# npm ls @azure/msal-node
node-red-project@0.0.1 /home/nr-user/.node-red
└─┬ node-red-contrib-mssql-plus@0.12.1
  └─┬ mssql@10.0.1
    └─┬ tedious@16.5.0
      └─┬ @azure/identity@2.1.0
        └── @azure/msal-node@1.18.3

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 December 2024 16:09 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/5 "2024-12-15T16:09:44Z")

</div>

Upgrade the Mssql node to the latest version.

---

<div class="post-metadata">

**Author:** ![Mike-FUT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike-fut/32/50736_2.png) [@Mike-FUT](https://discourse.nodered.org/u/Mike-FUT)\
**Post date:** [15 December 2024 16:16 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/6 "2024-12-15T16:16:15Z")

</div>

I just noticed I can't install or update any package.  
(node-red-contrib-mssql-plus@0.12.1 included)

I'll try to get rid of that package and I'll keep you posted.

---

<div class="post-metadata">

**Author:** ![Mike-FUT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike-fut/32/50736_2.png) [@Mike-FUT](https://discourse.nodered.org/u/Mike-FUT)\
**Post date:** [15 December 2024 16:28 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/7 "2024-12-15T16:28:20Z")

</div>

Uninstalling `node-red-contrib-mssql-plus` fixed it.  
I didn't know a failing pakage's dependency is causing the whole install system to no longer install/update anything until the package with the failing dependeny has been removed.

So apologies for the confusion, this issue was not at all related to MySQL packages.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 December 2024 17:24 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/8 "2024-12-15T17:24:53Z")

</div>

Upgrading to the latest version would probably have fixed it.

---

<div class="post-metadata">

**Author:** ![Mike-FUT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike-fut/32/50736_2.png) [@Mike-FUT](https://discourse.nodered.org/u/Mike-FUT)\
**Post date:** [15 December 2024 18:06 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/9 "2024-12-15T18:06:15Z")

</div>

Hi @Colin,  
Like I wrote, it didn't let me update. But I only tried via GUI/Palette.  
Is there another way that might/would have worked?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 December 2024 20:15 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/10 "2024-12-15T20:15:31Z")

</div>

Exactly how did you try to update?

---

<div class="post-metadata">

**Author:** ![Mike-FUT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike-fut/32/50736_2.png) [@Mike-FUT](https://discourse.nodered.org/u/Mike-FUT)\
**Post date:** [15 December 2024 20:18 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/11 "2024-12-15T20:18:07Z")

</div>

1. Opened Node-RED "Manage palette"
2. Searched in the "Nodes" tab for the mssql package
3. Clicked Update

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [15 December 2024 20:25 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/12 "2024-12-15T20:25:17Z")

</div>

I suspect the best approach is from the command line in ~/.node-red

```auto
npm remove node-red-contrib-mssql-plus
npm install node-red-node-mysql

```

And (if you really must)

```auto
npm install node-red-contrib-mssql-plus

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 December 2024 20:25 UTC](https://discourse.nodered.org/t/mysql-nodes-compatible-with-node-js-20/93910/13 "2024-12-29T20:25:38Z")

</div>

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