BloodHoundAD / BloodHound

Six Degrees of Domain Admin
GNU General Public License v3.0
9.8k stars 1.73k forks source link

M1 Mac build failing #652

Closed brentonswanepoel closed 1 year ago

brentonswanepoel commented 1 year ago

Trying to build bloodhound using reference, I am running mac m1, kali vm built on UTM:

https://bloodhound.readthedocs.io/en/latest/installation/linux.html

Running in to the below:

┌──(kali㉿kali)-[/opt/Bloodhound] └─$ sudo npm run build:linux

bloodhound@4.2.0 build:linux run-s compile package:linux

bloodhound@4.2.0 compile webpack --config webpack.config.production.js

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 (/opt/Bloodhound/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/opt/Bloodhound/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/opt/Bloodhound/node_modules/webpack/lib/NormalModule.js:471:10) at /opt/Bloodhound/node_modules/webpack/lib/NormalModule.js:503:5 at /opt/Bloodhound/node_modules/webpack/lib/NormalModule.js:358:12 at /opt/Bloodhound/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/opt/Bloodhound/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/opt/Bloodhound/node_modules/loader-runner/lib/LoaderRunner.js:221:10) at /opt/Bloodhound/node_modules/loader-runner/lib/LoaderRunner.js:236:3 at context.callback (/opt/Bloodhound/node_modules/loader-runner/lib/LoaderRunner.js:111:13) at /opt/Bloodhound/node_modules/babel-loader/lib/index.js:59:71 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }

Node.js v18.13.0 ERROR: "compile" exited with 1.

Downgraded neo4j, no joy also upgraded to latest.

kirk1256 commented 1 year ago

It’s an issue with open ssl 3. Try building with this, worked for me NODE_OPTIONS='--openssl-legacy-provider' npm run build

brentonswanepoel commented 1 year ago

Thanks, this works!