Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'error:03000086:digital envelope routines::initialization error' only when using conda-forge NodeJS #296

Closed
1 task done
astrojuanlu opened this issue Mar 13, 2023 · 1 comment
Labels

Comments

@astrojuanlu
Copy link
Member

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

When invoking react-scripts build, I'm getting a 'error:03000086:digital envelope routines::initialization error' only when using the conda-forge provided nodejs package. Using the exact same NodeJS and NPM versions installed with Homebrew on the same system and the same package-lock.json results in a successful command.

Complete error:

./node_modules/react-scripts/bin/react-scripts.js build
Creating an optimized production build...
/Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/react-scripts/scripts/build.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/juan_cano/Projects/QuantumBlack Labs/kedro-viz-copy-conda/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

See package versions below. Happy to provide more feedback or debug this further.

Installed packages

List of packages in environment: "/Users/juan_cano/.micromamba/envs/kviz310-node16-dev"

  Name                         Version    Build               Channel    
───────────────────────────────────────────────────────────────────────────
  bzip2                        1.0.8      h3422bc3_4          conda-forge
  c-compiler                   1.5.2      h5008568_0          conda-forge
  ca-certificates              2022.12.7  h4653dfc_0          conda-forge
  cairo                        1.16.0     h933af38_1010       conda-forge
  cctools                      973.0.1    hcbb26d4_11         conda-forge
  cctools_osx-arm64            973.0.1    hef52d2f_11         conda-forge
  clang                        14.0.6     hce30654_0          conda-forge
  clang-14                     14.0.6     default_h81a5282_0  conda-forge
  clang_osx-arm64              14.0.6     h15773ab_4          conda-forge
  clangxx                      14.0.6     default_hb7ecf47_0  conda-forge
  clangxx_osx-arm64            14.0.6     he29aa18_4          conda-forge
  compiler-rt                  14.0.6     h30b49de_0          conda-forge
  compiler-rt_osx-arm64        14.0.6     h48302dc_0          conda-forge
  compilers                    1.5.2      hce30654_0          conda-forge
  cxx-compiler                 1.5.2      hffc8910_0          conda-forge
  expat                        2.5.0      hb7217d7_0          conda-forge
  font-ttf-dejavu-sans-mono    2.37       hab24e00_0          conda-forge
  font-ttf-inconsolata         3.000      h77eed37_0          conda-forge
  font-ttf-source-code-pro     2.038      h77eed37_0          conda-forge
  font-ttf-ubuntu              0.83       hab24e00_0          conda-forge
  fontconfig                   2.14.2     h82840c6_0          conda-forge
  fonts-conda-ecosystem        1          0                   conda-forge
  fonts-conda-forge            1          0                   conda-forge
  fortran-compiler             1.5.2      h2ccabda_0          conda-forge
  freetype                     2.12.1     hd633e50_1          conda-forge
  fribidi                      1.0.10     h27ca646_0          conda-forge
  gettext                      0.21.1     h0186832_0          conda-forge
  gfortran                     12.2.0     h1ca8e4b_1          conda-forge
  gfortran_impl_osx-arm64      11.3.0     h2a9d086_31         conda-forge
  gfortran_osx-arm64           11.3.0     h57527a5_1          conda-forge
  glib                         2.74.1     hb5ab8b9_1          conda-forge
  glib-tools                   2.74.1     hb5ab8b9_1          conda-forge
  gmp                          6.2.1      h9f76cd9_0          conda-forge
  graphite2                    1.3.13     h9f76cd9_1001       conda-forge
  harfbuzz                     4.2.0      hc345670_0          conda-forge
  icu                          69.1       hbdafb3b_0          conda-forge
  isl                          0.25       h9a09cb3_0          conda-forge
  ld64                         609        h619f069_11         conda-forge
  ld64_osx-arm64               609        h7167370_11         conda-forge
  libclang-cpp14               14.0.6     default_h81a5282_0  conda-forge
  libcxx                       15.0.7     h75e25f2_0          conda-forge
  libffi                       3.4.2      h3422bc3_5          conda-forge
  libgfortran                  5.0.0      12_2_0_hd922786_31  conda-forge
  libgfortran-devel_osx-arm64  11.3.0     hfe9555d_31         conda-forge
  libgfortran5                 12.2.0     h0eea778_31         conda-forge
  libglib                      2.74.1     h4646484_1          conda-forge
  libiconv                     1.17       he4db4b2_0          conda-forge
  libllvm14                    14.0.6     hf6e71e7_1          conda-forge
  libpng                       1.6.39     h76d750c_0          conda-forge
  libsqlite                    3.40.0     h76d750c_0          conda-forge
  libuv                        1.43.0     h3422bc3_0          conda-forge
  libzlib                      1.2.13     h03a7124_4          conda-forge
  llvm-openmp                  15.0.7     h7cfbb63_0          conda-forge
  llvm-tools                   14.0.6     hf6e71e7_1          conda-forge
  mpc                          1.3.1      h91ba8db_0          conda-forge
  mpfr                         4.2.0      he09a6ba_0          conda-forge
  ncurses                      6.3        h07bb92c_1          conda-forge
  nodejs                       16.13.2    h15390d4_2          conda-forge
  openssl                      3.0.8      h03a7124_0          conda-forge
  pango                        1.50.7     h9fd36ab_0          conda-forge
  pcre2                        10.40      hb34f9b4_0          conda-forge
  pip                          23.0.1     pyhd8ed1ab_0        conda-forge
  pixman                       0.40.0     h27ca646_0          conda-forge
  pkg-config                   0.29.2     hab62308_1008       conda-forge
  python                       3.10.9     h3ba56d0_0_cpython  conda-forge
  readline                     8.1.2      h46ed386_0          conda-forge
  setuptools                   67.6.0     pyhd8ed1ab_0        conda-forge
  sigtool                      0.1.3      h44b9a77_0          conda-forge
  tapi                         1100.0.11  he4954df_0          conda-forge
  tk                           8.6.12     he1e0b03_0          conda-forge
  tzdata                       2022g      h191b570_0          conda-forge
  wheel                        0.38.4     pyhd8ed1ab_0        conda-forge
  xz                           5.2.6      h57fd34a_0          conda-forge
  zlib                         1.2.13     h03a7124_4          conda-forge

Environment info

__
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/


            environment : kviz310-node16-dev (active)
           env location : /Users/juan_cano/.micromamba/envs/kviz310-node16-dev
      user config files : /Users/juan_cano/.mambarc
 populated config files : 
       libmamba version : 1.3.1
     micromamba version : 1.3.1
           curl version : libcurl/7.86.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.47.0
     libarchive version : libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
       virtual packages : __unix=0=0
                          __osx=13.2.1=0
                          __archspec=1=arm64
               channels : 
       base environment : /Users/juan_cano/.micromamba
               platform : osx-arm64
@astrojuanlu
Copy link
Member Author

Progress: when using NodeJS > 16 and passing NODE_OPTIONS=--openssl-legacy-provider, the command works. I saw this advice everywhere but I was failing to apply it since apparently it is not accepted for NodeJS 16.

I think the reason I'm observing non-failing commands when using the Homebrew node is because macOS doesn't actually use OpenSSL, but LibreSSL. I'm unable to find any reference to this in webpack/webpack#14532 or nodejs/node#40455 (not very helpful threads to be honest, and looks like kids these days are more focused on finding workarounds than analyzing root causes).

I could also reproduce the problem with Node 18 installed with NVM on Ubuntu 22.04 (OpenSSL 3), and the problem was not appearing with Node 16.

I don't fully understand the versions timeline here but I ran out of yaks today. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant