Skip to content

Conversation

@tristandubbeld
Copy link
Contributor

@tristandubbeld tristandubbeld commented Nov 27, 2025

Upgrades the codebase from Node 16 to Node 18.

Changes

  • Updated all Node version specifications (package.json engines, .nvmrc, Dockerfiles, CI config)
  • Updated @types/node to ^18.0.0 in packages that use it
  • Updated CONTRIBUTING.md to reflect Node 18 requirement
  • Upgraded webpack from v4 to v5 in codesandbox-browserfs to support Node 18's OpenSSL 3.0 natively

Why Node 18?

Node 18 is the current LTS version and provides better performance, security updates, and modern JavaScript features. This upgrade ensures we're using a supported Node version.

Webpack 5 Upgrade

Upgraded webpack in codesandbox-browserfs from v4 to v5 to eliminate the need for the deprecated --openssl-legacy-provider flag. Webpack 4 uses legacy OpenSSL algorithms that are incompatible with Node 18's OpenSSL 3.0. The upgrade includes:

  • webpack: ~4.31.0 → ^5.88.0
  • webpack-cli: ~3.3.2 → ^5.1.0
  • webpack-dev-server: ~3.3.1 → ^4.15.0
  • source-map-loader: ~0.2.3 → ^4.0.0
  • Updated library configuration to webpack 5 format
  • Replaced -p flag with --mode production in build scripts

Additional Fix

Added resolution to use local workspace version of @codesandbox/components in sse-loading-screen to prevent it from pulling the old npm version that still requires Node 16.

@codesandbox
Copy link

codesandbox bot commented Nov 27, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Upgrade webpack from v4 to v5 to support Node 18's OpenSSL 3.0 natively,
eliminating the need for the deprecated --openssl-legacy-provider flag.

- Upgrade webpack: ~4.31.0 → ^5.88.0
- Upgrade webpack-cli: ~3.3.2 → ^5.1.0
- Upgrade webpack-dev-server: ~3.3.1 → ^4.15.0
- Upgrade source-map-loader: ~0.2.3 → ^4.0.0
- Update libraryTarget to library.type format (webpack 5 breaking change)
- Replace -p flag with --mode production in build scripts
- Update engines.node to >= 18.0.0
@tristandubbeld
Copy link
Contributor Author

Need to upgrade webpack first.

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

Successfully merging this pull request may close these issues.

2 participants