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
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!