gulp-spsave icon indicating copy to clipboard operation
gulp-spsave copied to clipboard

Error in SPSave on Node 17.2.0

Open dipetersen opened this issue 3 years ago • 2 comments
trafficstars

Just installed Node 17.2.0 and receive the following error. I was running Node10x without any problems. This was working before the upgrade.

'uploadToSharePoint' errored after 103 ms [15:30:35] Error in plugin "gulp-spsave" Message: error:0308010C:digital envelope routines::unsupported Details: opensslErrorStack: error:03000086:digital envelope routines::initialization error library: digital envelope routines reason: unsupported code: ERR_OSSL_EVP_UNSUPPORTED domainEmitter: [object Object] domainThrown: false

Stack: Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at Object.createNTLMHash (C:\Code\comminvoice\node_modules\node-ntlm-client\lib\hash.js:77:22) at Object.createType3Message (C:\Code\comminvoice\node_modules\node-ntlm-client\lib\ntlm.js:213:23) at C:\Code\comminvoice\node_modules\node-sp-auth\lib\src\auth\resolvers\OnpremiseUserCredentials.js:41:35 at processTicksAndRejections (node:internal/process/task_queues:96:5) [15:30:35] 'InitialDevDeploy' errored after 2.83 s

dipetersen avatar Dec 16 '21 21:12 dipetersen

I uninstalled Node 17.2.0 and installed 16.13.1 and it is working so there must have been a break in 17.

dipetersen avatar Dec 16 '21 21:12 dipetersen

It looks like it's a common problem for nodejs 17 and many other packages, which rely on OpenSSL internally.
I found the only workaround is to set

export NODE_OPTIONS=--openssl-legacy-provider

via command line. Taken from this webpack issue

s-KaiNet avatar Dec 17 '21 09:12 s-KaiNet