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

Update to NodeJS v20 #602

Closed
4 tasks done
vsaw opened this issue Jun 29, 2023 · 1 comment · Fixed by opendatacam/darknet#34 or #625
Closed
4 tasks done

Update to NodeJS v20 #602

vsaw opened this issue Jun 29, 2023 · 1 comment · Fixed by opendatacam/darknet#34 or #625
Assignees
Labels
Milestone

Comments

@vsaw
Copy link
Collaborator

vsaw commented Jun 29, 2023

Goal

Remove NodeJS 12, which is obsolete and outdated, and switch to the current NodeJS 20 (LTS)

TODOs

  • Fix Runtime error (see below)
  • Remove NodeJS 12 from Darknet base
  • Install Node 20 in ODC container
  • Update CI/CD tests to use Node 18 and 20

Background Info

Most likely due to OpenDataCam/NextJs being out of date. The error I get when starting is:

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/vsaw/Documents/Development/opendatacam/opendatacam/node_modules/next/dist/compiled/webpack/bundle5.js:133790:18)
    at BulkUpdateDecorator.update (/Users/vsaw/Documents/Development/opendatacam/opendatacam/node_modules/next/dist/compiled/webpack/bundle5.js:133692:50)
    at /Users/vsaw/Documents/Development/opendatacam/opendatacam/node_modules/next/dist/compiled/webpack/bundle5.js:56905:9
    at /Users/vsaw/Documents/Development/opendatacam/opendatacam/node_modules/next/dist/compiled/webpack/bundle5.js:29533:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Workaround: Use NODE_OPTIONS=--openssl-legacy-provider e.g.

NODE_OPTIONS=--openssl-legacy-provider npm run dev
@vsaw vsaw added the bug label Jun 29, 2023
@vsaw vsaw added this to the v4.0.0 milestone Jun 29, 2023
@vsaw vsaw changed the title Can not run OpenDataCam on NodeJS v18 Update to NodeJS v18 Sep 20, 2023
@vsaw vsaw self-assigned this Nov 27, 2023
@vsaw
Copy link
Collaborator Author

vsaw commented Nov 27, 2023

I tried updating NextJS but that didn't work because of https://stackoverflow.com/questions/73761243/you-are-using-legacy-implementaion-please-update-your-code-use-createwrapper

Will try again tomorrow by setting NODE_OPTIONS.

@vsaw vsaw mentioned this issue Nov 28, 2023
9 tasks
@vsaw vsaw linked a pull request Nov 28, 2023 that will close this issue
@vsaw vsaw changed the title Update to NodeJS v18 Update to NodeJS v20 Nov 28, 2023
vsaw pushed a commit to vsaw/darknet that referenced this issue Nov 28, 2023
vsaw pushed a commit to vsaw/opendatacam that referenced this issue Nov 28, 2023
@vsaw vsaw linked a pull request Nov 28, 2023 that will close this issue
@vsaw vsaw closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant