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: error:0308010C:digital envelope routines::unsupported — Failed to run scripts/build.: The custom tool failed. #8

Closed
troublesprouter opened this issue Jan 4, 2023 · 1 comment

Comments

@troublesprouter
Copy link

When running II_FETCH_ROOT_KEY=1 II_DUMMY_CAPTCHA=1 dfx deploy --no-wallet --argument '(null)' I'm getting:

black@MacBook-Pro internet-identity % II_FETCH_ROOT_KEY=1 II_DUMMY_CAPTCHA=1  dfx deploy --no-wallet --argument '(null)'

Deploying all canisters.
All canisters have already been created.
Building canisters...
Executing 'scripts/build'
Compiling internet_identity frontend assets

> @dfinity/[email protected] build
> NODE_ENV=production npm run opts -- webpack --config-name app


> @dfinity/[email protected] opts
> NODE_OPTIONS='--loader ts-node/esm --experimental-specifier-resolution=node' "$@" webpack --config-name app

(node:29961) ExperimentalWarning: Custom ESM Loaders is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:29961) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/Users/black/icp/internet-identity/node_modules/webpack/lib/util/createHash.js:145:18)
    at BulkUpdateDecorator.update (/Users/black/icp/internet-identity/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/Users/black/icp/internet-identity/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:868:17)
    at handleParseResult (/Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:934:10)
    at /Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:1026:4
    at processResult (/Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:743:11)
    at /Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:807:5
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/Users/black/icp/internet-identity/node_modules/webpack/lib/util/createHash.js:145:18)
    at BulkUpdateDecorator.update (/Users/black/icp/internet-identity/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/Users/black/icp/internet-identity/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:868:17)
    at handleParseResult (/Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:934:10)
    at /Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:1026:4
    at processResult (/Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:743:11)
    at /Users/black/icp/internet-identity/node_modules/webpack/lib/NormalModule.js:807:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to build call canisters.
    Failed while trying to build all canisters.
      The build step failed for canister 'renrk-eyaaa-aaaaa-aaada-cai' (internet_identity) with an embedded error: Failed to build custom canister internet_identity.: Failed to run scripts/build.: The custom tool failed.

@troublesprouter
Copy link
Author

It seems to be a problem with Node 17.

This fixed it:

nvm install 16
nvm use 16

Ref: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

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

No branches or pull requests

1 participant