+2 votes
in Rock by (13.1k points)
edited

Originally posted by Unknown

When trying to compile Rock versions 13 and up, I get these errors:

enter image description here

If I switch over to the Developer Powershell in Visual Studio, switch to the Rock.Javascript.Obsidian directory ( cd .\Rock.JavaScript.Obsidian\ ) and run npm run build , I get a slightly more helpful error talking about something with OpenSSL that's unsupported:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\webpack\lib\util\createHash.js:145:18)
    at BulkUpdateDecorator.digest (C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\webpack\lib\util\createHash.js:80:21)
    at ConcatenatedModule._createIdentifier (C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\webpack\lib\optimize\ConcatenatedModule.js:1025:47)
    at ConcatenatedModule.create (C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\webpack\lib\optimize\ConcatenatedModule.js:653:41)
    at C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\webpack\lib\optimize\ModuleConcatenationPlugin.js:365:43
    at arrayEach (C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\neo-async\async.js:2405:9)
    at Object.each (C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\neo-async\async.js:2846:9)
    at C:\Users\Russell\Documents\Rock-Dev\Rock V13.7\Rock.JavaScript.Obsidian\node_modules\webpack\lib\optimize\ModuleConcatenationPlugin.js:351:15 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'

How do I get Rock to compile and get back to developing cool new Rock stuff?

1 Answer

+2 votes
by (13.1k points)
edited
 
Best answer

Originally posted by Unknown

According to this post you need to either enable Legacy OpenSSL support or downgrade nodejs to version 16 (or earlier). I tried to enable Legacy OpenSSL on version 18 of nodejs without much luck, but I was able to get rock to compile after downgrading to nodejs 16. I used this guide but the TL;DR is:

  1. Uninstall nodejs if you have it installed on your computer

  2. Download nvm for windows (scroll down and download nvm-setup.exe)

  3. Open Windows Powershell and type nvm install 16.19.1 and then nvm use 16.19.1

by (13.1k points)
(Originally by Unknown) Thanks!
by (13.1k points)
(Originally by Unknown) @MasonKinyon You're welcome
by KateQuinn (6.8k points)
Amazing, thank you so much Russell.
Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...