Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Upgrade NodeJs to ~> 18.10.x #264

Closed
adbatista opened this issue Oct 10, 2022 · 6 comments
Closed

Upgrade NodeJs to ~> 18.10.x #264

adbatista opened this issue Oct 10, 2022 · 6 comments

Comments

@adbatista
Copy link
Contributor

No description provided.

@HeitorMC
Copy link
Contributor

Hey, I've tried to update the nodeJS version to 18.10.0. However, I discovered that Node.JS 17 or above uses OpenSSL3, which is incompatible with the webpack version 4. The latest version of gem webpacker uses webpack 4.x.x+

This is the error that I got when I tried to app rails webpacker:compile

node:internal/crypto/hash:71 this[_Handle] = new Hash(algorithm, xofLen); ^ Error: error:0308010C:digital envelope routines::unsupported

@HeitorMC
Copy link
Contributor

Hey, I would like to be assign for this issue 🤝

@HeitorMC
Copy link
Contributor

HeitorMC commented Oct 17, 2022

Hey, I have some news: The gem webpacker has been retired, and for rails 7 apps, there are three great default answers to JavaScript in 2021+, according to the README of webpacker.

So, this gem won't receive new updates to include newer versions of JS and still will use webpack 4.x.x+. Also, there is a kind of "fork" of webpacker, called Shakapacker but uses Webpack v5+. Both webpacker 4 and v5+ are incompatible with nodeJS > 17 because of the openSSL3.

Right now, I can picture two cases for this issue:

  • Since we do have this issue Remove React in favor of HotWired #263, one approach would be to use importmap + hotwire instead of webpacker because this approach removes the node dependency in the project. However, I don't know viable is this choice.

  • Stick with webpacker gem and use the node flag --openssl-legacy-provider. This becomes a valid approach because nodeJS will be used only in build time, so it doesn't seem a problem and solves the issue.

WDYT?

@adbatista
Copy link
Contributor Author

I don't see a problem using node with openssl3, but since we will use hotwired let's go with this approach, thanks for investigating it

@abarbosa-godaddy
Copy link

abarbosa-godaddy commented Oct 18, 2022

should we add a hold label to this issue? @adbatista

@adbatista
Copy link
Contributor Author

why?

@HeitorMC HeitorMC removed their assignment Nov 1, 2022
@adbatista adbatista closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants