tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.22k stars 464 forks source link

mssql 6 incompatible with node v12 #1600

Closed gilesbradshaw closed 5 months ago

gilesbradshaw commented 5 months ago

Expected behaviour:

I should be able to get mssql v 6 working on node v12. I know I used to be able to do this as I am rebuilding an old project (hence the ancient versions)

Actual behaviour:


0.544 yarn install v1.21.1                                                                                                                                                                                                                                                                                                                  
0.568 info No lockfile found.                                                                                                                                                                                                                                                                                                               
0.574 [1/4] Resolving packages...                                                                                                                                                                                                                                                                                                           
2.864 warning mssql > tedious > @azure/ms-rest-nodeauth > adal-node@0.2.4: This package is no longer supported. Please migrate to @azure/msal-node.                                                                                                                                                                                         
4.653 warning mssql > tedious > @azure/ms-rest-nodeauth > adal-node > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
5.009 [2/4] Fetching packages...
11.43 error @azure/core-auth@1.5.0: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "12.14.1"
11.46 error Found incompatible module.
11.46 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
Dockerfile:4
--------------------
   2 |     WORKDIR /app
   3 |     COPY ./package.json /app
   4 | >>> RUN yarn
   5 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn" did not complete successfully: exit code: 1

Configuration:

Dockerfile

FROM node:12.14.1-alpine
WORKDIR /app
COPY ./package.json /app
RUN yarn

package.json

{
  "name": "account",
  "version": "0.0.1",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "mssql": "6.0.1"
  }
}

Software versions

it's basically down to this... https://github.com/Azure/ms-rest-js/issues/488

dhensby commented 5 months ago

V6 isn't maintained any more, but you can likely force the version of the transitive dependencies using overrides