bestlong / node-red-contrib-mssql-plus

A Node-RED node to read and write to Microsoft MS SQL Databases
MIT License
31 stars 18 forks source link

Does not install with nodejs 20 (@azure/msal-node issue) #77

Closed colinl closed 2 weeks ago

colinl commented 11 months ago

Version 0.10.2 will not install with nodejs 20.4.0 on Ubuntu 20.04. The dependency @azure/msal-node requires nodejs 10,12,14,16 or 18. The error when attempting to install is

~/.node-red$ npm install node-red-contrib-mssql-plus
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@azure/msal-node@1.18.0',
npm WARN EBADENGINE   required: { node: '10 || 12 || 14 || 16 || 18' },
npm WARN EBADENGINE   current: { node: 'v20.4.0', npm: '9.7.2' }
npm WARN EBADENGINE }
jfaigan commented 10 months ago

FYI, I am having the same issue. image

jfaigan commented 10 months ago

I was able to bypass the issue by manually installing the npm package and omitting the --engine-strict flag

npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-mssql-plus@0.10.2

Steve-Mcl commented 9 months ago

@azure/msal-node is a grandchild dependancy of mssql (mssql -> tedious -> i_forget_what_this_one_is -> @azure/msal-node

@azure/msal-node is currently at v 2.1.0 and DOES support node 20

It may be this packages dependency mssql needs updating to v10.0.0 (or perhaps 9.3.2) to get the problematic sub dependency @azure/msal-node up to v2.x)

@bestlong do you have time to look into this?

bestlong commented 9 months ago

@colinl try npm i node-red-contrib-mssql-plus@0.11.0-beta

bestlong commented 9 months ago

about tedious depandency package @azure/msal-node

1.18.3 support

  "engines": {
    "node": "10 || 12 || 14 || 16 || 18"
  }

^2.0.0 support

  "engines": {
    "node": "18 || 20"
  }

upgrade is not good decision

suggest downgrade use nodejs latest LTS version.

colinl commented 9 months ago

Sorry, I did not receive a notification of your earlier message asking me to try the beta version. Nodejs 20 is overdue to become the current LTS (https://nodejs.dev/en/about/releases/) so presumably it will be announced as LTS very soon. You could release your node as a new major version, requiring 18 or 20.

bestlong commented 9 months ago

wait https://github.com/tediousjs/tedious/pull/1575 PR merge

Steve-Mcl commented 2 weeks ago

This is long since resolved as far as I can see?

colinl commented 2 weeks ago

Don't the dependencies need to be updated to make sure that the later version of tedious is installed if a user upgrades this node to the latest version? Otherwise it is necessary to uninstall this node and re-install it again.

Steve-Mcl commented 2 weeks ago

Yes, and that will happen (soon), but for now semver will do the job.