hyperformula icon indicating copy to clipboard operation
hyperformula copied to clipboard

Add more info to Building instructions (Node 16 LTS)

Open thilgen opened this issue 1 year ago • 1 comments

Description

  • After working through https://github.com/handsontable/hyperformula/issues/1166
  • I encountered the following error when attempting to npm run bundle:development
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (~/Desktop/hyperformula/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (~/Desktop/hyperformula/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (~/Desktop/hyperformula/node_modules/webpack/lib/NormalModule.js:471:10)
    at ~/Desktop/hyperformula/node_modules/webpack/lib/NormalModule.js:503:5
    at ~/Desktop/hyperformula/node_modules/webpack/lib/NormalModule.js:358:12
    at ~/Desktop/hyperformula/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (~/Desktop/hyperformula/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (~/Desktop/hyperformula/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at ~/Desktop/hyperformula/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (~/Desktop/hyperformula/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at ~/Desktop/hyperformula/node_modules/babel-loader/lib/index.js:44:71 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

The solution was to ensure that my local handsontable/hyperformula project was using Node 16 LTS (as mentioned on the Building Hyperformula page

We use the latest version of Node 16 LTS in the build-chain and recommend this version for building. Note that for using (not building) HyperFormula, a wider range of Node versions is supported.

I recommend a note be added to Building Hyperformula that suggests the step of installing Node 16 LTS locally in the project.

$ npm install node@v16-lts

Note: If the buildchain is going to stay on this older version for a while - and since it is likely that more build issues will be discovered that require workarounds - is it worth considering add a troubleshooting page so things like this can be collected and shared?

thilgen avatar Mar 12 '23 21:03 thilgen

Thank you for sharing the feedback. It sounds like a good idea.

AMBudnik avatar Mar 13 '23 10:03 AMBudnik