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

getting this error while building react image (digital envelope routines::unsupported) #320

Open
Divyashet66 opened this issue Jun 30, 2023 · 3 comments

Comments

@Divyashet66
Copy link

[builder] Error: error:0308010C:digital envelope routines::unsupported
[builder] at new Hash (node:internal/crypto/hash:69:19)
[builder] at Object.createHash (node:crypto:138:10)
[builder] at BulkUpdateDecorator.hashFactory

@Divyashet66 Divyashet66 added the kind/bug Something isn't working label Jun 30, 2023
@jama22
Copy link
Collaborator

jama22 commented Jun 30, 2023

@Divyashet66 i dont think we have enough information to identify the issue here. Please help us by providing more information:

Describe the bug
Please provide a clear and concise description of what the bug is.

If you have a general question about how to use buildpacks, we encourage you to open a discussion topic instead

Additional context
How are you using GCP buildpacks?

  • pack and the gcr.io/buildpacks/builder
  • Cloud Functions
  • Cloud Run
  • Cloud Build
  • App Engine Standard
  • App Engine Flex

Did this used to work?
(Yes/No)
Was this working before? When did you start noticing these errors?

What language is your project primarily written in?
(Python/Java/Node.js/Go/etc.)

Steps To Reproduce
Steps to reproduce the behavior:

  1. pack build ...

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
What actually happened?

If applicable, add screenshots / logs / error messages

@jama22 jama22 removed the kind/bug Something isn't working label Jun 30, 2023
@Divyashet66
Copy link
Author

I used command pack build image_name --builder gcr.io/buildpacks/builder:google-22

while building the image, I got this error

rror: 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 (/layers/paketo-buildpacks_npm-install/build-modules/node_modules/next/dist/compiled/webpack/bundle5.js:133863:18)
at BulkUpdateDecorator.update (/layers/paketo-buildpacks_npm-install/build-modules/node_modules/next/dist/compiled/webpack/bundle5.js:133764:50)
at /layers/paketo-buildpacks_npm-install/build-modules/node_modules/next/dist/compiled/webpack/bundle5.js:56911:9
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at runNextTicks (node:internal/process/task_queues:64:3)
at process.processImmediate (node:internal/timers:447:9) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

I think we are getting this error because while installing dependencies we have to do npm i --legacy-peer-deps, but in buildpacks it's not happening

can you please provide a solution for this?

and also how to mention the specific version of nodejs, so that buildpack uses that version of node to build the image,

Thank you so much for your time

@smsohan
Copy link
Collaborator

smsohan commented Jul 6, 2023

I see these in the stack trace /layers/paketo-buildpacks_npm-install and it's possible that you're using a builder other than GCP builder.

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

3 participants