Building and running the webviewer-ui


I cloned the GitHub repo of the webviewer-ui, performed an npm install successfully and attempted npm run start.

This is the error I get in response:

webviewer-ui@10.9.0 start
npx babel-node ./dev-server.js

Debugger listening on ws://
For help, see: Node.js — Debugging Node.js
Debugger attached.
Listening at localhost:3000 (
this[kHandle] = new _Hash(algorithm, xofLen);

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:68:19)
at Object.createHash (node:crypto:138:10)
at module.exports (/Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/webpack/lib/NormalModule.js:471:10)
at /Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/webpack/lib/NormalModule.js:503:5
at /Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/webpack/lib/NormalModule.js:358:12
at /Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at Array. (/Users/klausnji/dev/apryse-co/webviewer-ui/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
library: ‘digital envelope routines’,
reason: ‘unsupported’,

Node.js v20.9.0

For the webviewer-react-sample, I was able to add this parameter --openssl-legacy-provider to the start script to bypass a similar error.

I have tried passing the same option above as a node option to the start script in the webviewer-ui but this does not get rid of the error. I am also running Node 20. Anyone run into this issue?

Hi there,

Could you try running this line before npm start?

export NODE_OPTIONS=--openssl-legacy-provider

Best Regards,

Issue resolved!

I had to manually copy the Core folder from node_modules/@pdftron/webviewer to webviewer-ui/lib/

1 Like

Thanks Darian. I did that, ran a build successfully. However, when I now attempt to run the project, I get a blank screen with these errors: