-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sp-rest-proxy does not work with Node 18.16.0 (current LTS) #163
Comments
Found a workaround for using v18.16.0:
npm i --save-dev cross-env
cross-env NODE_OPTIONS=--openssl-legacy-provider <proxyLaunch> So for me the package.json line was: { "proxy": "cross-env NODE_OPTIONS=--openssl-legacy-provider node ./.sp-rest-proxy/server.js", } Of course the other workaround is to revert to using v16.20.0 :) |
Having said all of that using --openssl-legacy-provider still gives socket hang up errors, so the best solution is to revert node version to v16. There error this time was: Error FetchError: request to https://...admin/_api/web/lists/getByTitle(%27List%27)/items?$filter=OpportunityId_List%20eq%20%27222655,175452,213883,OP75509,194456,162443,OP74527,206207,162672,158434,173954,164109,175451,201289,173955%27 failed, reason: socket hang up
at ClientRequest.<anonymous> (C:\...\node_modules\node-fetch\lib\index.js:1505:11)
at ClientRequest.emit (node:events:513:28)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketOnEnd (node:_http_client:526:9)
at TLSSocket.emit (node:events:525:35)
at TLSSocket.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12) |
Hi, @koltyakov I don't suppose you have an update for this please? |
sp-rest-proxy does not work with Node 20 |
@kokoc58 to run it with Node.js >= 18 you need to start in Node.js process with npx cross-env NODE_OPTIONS=--openssl-legacy-provider ts-node ./src/server Alternatively, we can contribute to node-sp-auth e.g. by replacing legacy NTLM client maybe with https://www.npmjs.com/package/@ewsjs/ntlm-client What auth strategy do you use, Данила? :) Does is work for you with |
Hello again!
I've just updated my Windows 10 dev machine to Node 18.16.0 (current LTS) and sp-rest-proxy is throwing errors on all calls.
If I revert the Node version to v16.20.0 then the proxy starts working again with no code change.
My credential strategy is OnpremiseUserCredentials as I am using SP 2013 on-prem.
The text was updated successfully, but these errors were encountered: