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

SPIKE [2]: Error: error:0308010C:digital envelope routines::unsupported while running styleguidest #121

Open
theNerd247 opened this issue Jul 5, 2023 · 4 comments · May be fixed by #123
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@theNerd247
Copy link
Contributor

theNerd247 commented Jul 5, 2023

DoD:

This error doesn't occur while running styleguidest

Details:

The following error occurs when running the test application:

$ yarn start
yarn run v1.22.19
$ styleguidist server
ℹ 「wds」: Project is running at http://localhost:6060/
ℹ 「wds」: webpack output is served from undefined
ℹ 「wds」: Content not from webpack is served from /Users/noah/src/translation-helps-rcl
You can now view your style guide in the browser:

  Local:            http://localhost:6060/
  On your network:  http://172.16.103.170:6060/

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

From what I gather this is a compatibility issue between Node16 and Node18.

Current solutions involve either:

  1. a global environment downgrade to Node16
  2. Using tools like nvm
  3. run the application using NODE_OPTIONS=--openssl-legacy-provider yarn start if they are running Node18.

Essentially this bring us to the question: Here are a few things to consider:

  1. Should we begin upgrading this lib to support Node18
  2. Should we begin enforcing Node versions in the package.json?
  3. Do we still need Node16 support in this library? (3) above works for me and I do not notice any broken functionality once the styleguidest app builds and runs. I'm not sure what affect running higher versions of node will have on other machines though.
  4. How wide-spread is this library and how many of those dependents use Node16? That is, what would the "damage report" be if we did an upgrade?

Personally I would recommend upgrading to at least Node18 as sticking to latest LTS versions are typically a good idea.

If we decide to stick with Node16 for now I would recommend we use the engines config in package.json to ensure global compatibility of this library across other apps. New developers (especially those new to JS development) would most likely have the latest version of the LTS Node installed and will run into this issue. There is no mention of using Node16 in the README, however it would be much better to enforce this technically (rather than relying on developers to parse a README file).

This same issue appears in other apps (such as gateway-edit) and could benefit from an upgrade away from Node16 as well.

@theNerd247 theNerd247 added enhancement New feature or request question Further information is requested bug Something isn't working and removed enhancement New feature or request labels Jul 5, 2023
@birchamp
Copy link

@theNerd247 has there been any further discussion on this issue?

@theNerd247
Copy link
Contributor Author

Unfortunately, no.

@birchamp birchamp changed the title Error: error:0308010C:digital envelope routines::unsupported while running styleguidest SPIKE [2]: Error: error:0308010C:digital envelope routines::unsupported while running styleguidest Jul 27, 2023
@theNerd247 theNerd247 linked a pull request Aug 2, 2023 that will close this issue
@theNerd247 theNerd247 linked a pull request Aug 2, 2023 that will close this issue
@theNerd247
Copy link
Contributor Author

@birchamp I've created a PR related to this issue as a result of the spike. Here's the current results:

  • the styleguidist server works with no problems using Node 18 and webpack 5.
  • I've created a PR to test our CI process with updating to Node 18 and webpack 5
    • I'm currently facing a problem with the CI failing as the Netlify portion is using Node 16 still. Upgrading Netlify in the CI for translation-helps-rcl to use Node 18 would be a next step.
  • I still need to test to see if local development is doable while using Node 16 with webpack 5

@theNerd247
Copy link
Contributor Author

This issue holds for gateway-edit as well. I've tested building with both Node16 and later versions of Node - none of which work. It appears upgrading to webpack 5 might be the solution regardless of the version of node used.

theNerd247 added a commit to unfoldingWord/gateway-edit that referenced this issue Nov 27, 2023
__This is a temporary fix__

Any machine building with node >= 18 runs into this issue:
unfoldingWord/translation-helps-rcl#121

A localized solution would be to `export NODE_OPTIONS` in
the environment on executes `yarn build` in, however this
environment is - for some reason - _not copied_ to the process
that executes `node` (maybe a `next` thing?). Thus, I am creating
this PR so that myself and other developers using a later version
of node can build without constantly manually editing the
package.json
theNerd247 added a commit to unfoldingWord/gateway-edit that referenced this issue Nov 29, 2023
__This is a temporary fix__

Any machine building with node >= 18 runs into this issue:
unfoldingWord/translation-helps-rcl#121

I've modified the build scripts to use the set-env.sh scripts
to determine what the NODE_OPTIONS should be when building.
PhotoNomad0 added a commit to unfoldingWord/gateway-edit that referenced this issue Dec 6, 2023
* Replace hard coded card names in merge dialog to resource titles

* Replace BranchMergerContext with state in app context

* Update single-scripture-rcl version for #546 (#558)

* Update issue templates

* Add button to TSV Resource Cards to Add another TSV resource

* Moved add button in TWL to actions column in table

* Feature 559 / support front matter (#561)

* added front to demo

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* add error message handling

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

* update dependencies

---------

Co-authored-by: PhotoNomad0 <[email protected]>

* Save to DCS on TSV Add & Navigate to new TSV Row (#571)

* Changes to save new TSV row to DCS on add

* Changes to navigate to newly created tsv row

* Only generate Tsv data if resource is tsv

* Change const, clarify ternary, update scrip-tsv version

* feature 524 / added alignment reset and multi-select. (#576)

* added alignment reset and multi-select.

* update dependencies

* update dependencies

---------

Co-authored-by: PhotoNomad0 <[email protected]>

* Update version of scripture-tsv to 0.2.1 (#584)

* Fix for 500 errors (#583)

Updated versions of gitea-react-toolkit and single-scripture-rcl

Co-authored-by: PhotoNomad0 <[email protected]>

* Feature kintsoogi 484 delete tsv (#587)

* Add delete tsv functionality and pure setItemIndex

* Small fix for newQuote

* update dependencies

---------

Co-authored-by: PhotoNomad0 <[email protected]>

* upgrades translation-helps-rcl to 3.5.13

* Display add button in header for TWL when no items (#597)

- Display add button in header for TWL when no items
- Do not display delete button if no items in tsv resource card

* Updated version of scripture-resources-rcl

Fixes problem where empty last tsv item in book throws errors

* fixes build error while building with node >= 18

__This is a temporary fix__

Any machine building with node >= 18 runs into this issue:
unfoldingWord/translation-helps-rcl#121

I've modified the build scripts to use the set-env.sh scripts
to determine what the NODE_OPTIONS should be when building.

* Bump version to 2.2.0

* qaFail 602 / Save button is enabled when edit box is clicked (#608)

update single-scripture-rcl

* Bugfix 570 / Fix highlighting errors with right quote in Greek Word (#604)

fixes for highlighting right quotes in original languages

---------

Co-authored-by: kintsoogi <[email protected]>
Co-authored-by: Kintsoogi <[email protected]>
Co-authored-by: elsylambert <[email protected]>
Co-authored-by: PhotoNomad0 <[email protected]>
Co-authored-by: Noah Harvey <[email protected]>
Co-authored-by: Noah Harvey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants