Did you get hit with the "Node 17 digital envelope routines::unsupported" error?

Apparently the work around is adding NODE_OPTIONS=--openssl-legacy-provider to your scripts, like such:


  "scripts": {
    "build": "NODE_OPTIONS=--openssl-legacy-provider webpack --env.production --extractCss",
    "start": "NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --extractCss",
    "build:dev": "NODE_OPTIONS=--openssl-legacy-provider webpack --extractCss",
    "analyze": "NODE_OPTIONS=--openssl-legacy-provider webpack --env.production --analyze",
    "test": "NODE_OPTIONS=--openssl-legacy-provider au test",
    "e2e": "NODE_OPTIONS=--openssl-legacy-provider au cypress --run",
    "e2e:headless": "NODE_OPTIONS=--openssl-legacy-provider au cypress --start --run"
  },

Is there a better way, like adding something to webpack or Aurelia’s config file?

I just updated to Webpack 5.

Yes, I ran into the same ERR_OSSL_EVP_UNSUPPORTED error with Node 17. It’s caused by changes in OpenSSL 3, which Node 17 uses. A simple fix is to switch to Node.js 16.x LTS, which still uses OpenSSL 1.1 and doesn’t trigger this error. You can manage versions easily using nvm (Node Version Manager).

Hope it helps!