ReactVision / viro

ViroReact: The AR and VR library for React Native πŸ“³πŸ’™πŸ’›πŸ€πŸ’š

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: error:0308010C:digital envelope routines::unsupported

DanSFLeonard opened this issue Β· comments

Requirements:

Please go through tnhis checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: MacOS Ventura 13.1
  2. Device OS & Version: Not getting that far
  3. Version: ViroReact version 2.17.0 React Native version 0.59.9 CLI 2.0.1
  4. Device(s): Within terminal on MacBook
  5. Node 21.5.0. OpenSSL 3.2.0. ngrok 3.5.0

Description

Followed instructions found at https://viro-community.readme.io/docs/quick-start-maclinux

Researched error:0308010C and per suggestions upgraded node, OpenSSL and ngrok. Got the same error.
I tried adding "NODE_OPTIONS=--openssl-legacy-provider" in package.json; didn't get any error but froze after "Loading dependency graph, done."
I created a new directory and reinstalled ViroSample there before retrying npm start.
I haven't changed anything in the new ViroSample directory.

Reproducible Demo

danleonard@Dans-MacBook-Pro ViroSample % npm start

ViroSample@0.0.1 prestart
./node_modules/react-viro/bin/run_ngrok.sh

Ngrok is already running

ViroSample@0.0.1 start
node node_modules/react-native/local-cli/cli.js start

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”‚ Running Metro Bundler on port 8081. β”‚
β”‚ β”‚
β”‚ Keep Metro running while developing on any JS projects. Feel free to β”‚
β”‚ close this tab and run your own Metro instance if you prefer. β”‚
β”‚ β”‚
β”‚ https://github.com/facebook/react-native β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Looking for JS files in
/Users/Shared/viro/ViroS2/ViroSample

Loading dependency graph, done.
Loading dependency graph...node:internal/crypto/hash:68
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 stableHash (/Users/Shared/viro/ViroS2/ViroSample/node_modules/metro-cache/src/stableHash.js:18:6)
at JsTransformer.getCacheKey (/Users/Shared/viro/ViroS2/ViroSample/node_modules/metro/src/JSTransformer/worker.js:455:7)
at getTransformCacheKey (/Users/Shared/viro/ViroS2/ViroSample/node_modules/metro/src/DeltaBundler/Transformer/getTransformCacheKey.js:39:29)
at new Transformer (/Users/Shared/viro/ViroS2/ViroSample/node_modules/metro/src/DeltaBundler/Transformer.js:147:28)
at /Users/Shared/viro/ViroS2/ViroSample/node_modules/metro/src/Bundler.js:53:27
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Fixed by going to old version of node (Using brew on Mac) . Not sure if the best approach.

brew install node@16
brew unlink node
brew link node@16

Glad you were able to figure this out! We are planning on updating this documentation in the future with a better guide.