[Solved] Error while setting up app-clipper

Version: v2.12.18
OS: Linux (Ubuntu)

I am trying to setup app-clipper on my system, but I'm getting an error (the CLI and desktop apps work without error). The error occurs when I run npm run watch at /packages/app-clipper/popup
The error thrown is:

⠋ Start webpack watchnode:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/util/createHash.js:135:53)
    at getHash (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/ModuleFilenameHelpers.js:45:15)
    at ModuleFilenameHelpers.createFilename (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/ModuleFilenameHelpers.js:82:10)
    at /home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/SourceMapDevToolPlugin.js:231:33
    at Array.forEach (<anonymous>)
    at /home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/SourceMapDevToolPlugin.js:186:12
    at SyncHook.eval [as call] (eval at create (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:12:1)
    at SyncHook.lazyCompileHook (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.5.1

I've tried it yesterday and it works for me, but I use Node 19. Maybe try with this?

tried running using Node v19.0.0. still getting the same error.

> joplin-webclipper-popup@0.1.0 watch
> cra-build-watch


✔ Update webpack configuration
✔ Clear destination folder
⠋ Start webpack watchnode: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:140:10)
    at module.exports (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/util/createHash.js:135:53)
    at getHash (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/ModuleFilenameHelpers.js:45:15)
    at ModuleFilenameHelpers.createFilename (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/ModuleFilenameHelpers.js:82:10)
    at /home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/SourceMapDevToolPlugin.js:231:33
    at Array.forEach (<anonymous>)
    at /home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/lib/SourceMapDevToolPlugin.js:186:12
    at SyncHook.eval [as call] (eval at create (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:12:1)
    at SyncHook.lazyCompileHook (/home/vbuntu/Desktop/Vatsal/Programming/open-source-contributions/joplin/packages/app-clipper/popup/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v19.0.0

Set the following option export NODE_OPTIONS=--openssl-legacy-providerSet the following option

Thank you! While I could not export NODE_OPTIONS globally (gives an error saying node: --openssl-legacy-providerSet is not allowed in NODE_OPTIONS, I added node-options="--openssl-legacy-provider" in a .npmrc file in the packages/app-clipper/popup folder, and the clipper started without error!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.