published fresh until

error:0308010C: how to fix Node/Vite upgrade failures?

Summary As of October 2026, Node/Vite upgrade failures need different repairs: remove legacy hashing for OpenSSL errors, use a supported Node runtime for crypto.hash, or restore the target native optional dependency for Rollup/Rolldown. Match the exact error before changing the lockfile.

Not for MCP desktop uses wrong Node, see mcp-desktop-client-npx-wrong-node-nvm

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Identify the missing API, rejected algorithm or native package before changing Node or lockfiles.

Version boundaries, checked 2026-11-15

Official sourceBoundaryConsequence
Node release noteNode 17.0.0 introduced OpenSSL 3.0Legacy algorithms can fail.
Node crypto APIcrypto.hash added in 20.12.0 and 21.7.0API presence alone is insufficient for Vite.
Vite 7 guideNode 20.19+ or 22.12+Check the minor version too.
Vite 8 announcementStable Vite 8 on 2026-03-12; Rolldown bundlerRollup/Rolldown bindings differ.
Node statusAs of November 2026, Node 26, 24 and 22 LTS; 20 EOLPrefer supported LTS meeting tool engines.
webpack docsxxhash64 supported since 5.54.0Alternative for output hashing.

Compatibility boundaries only.

Which repair to choose

Message familyInspectRepair
digital envelope routines unsupportedHashing caller in stackUpdate owning tool/algorithm
crypto.hash is not a functionExecuting Node binarySelect supported runtime
Missing native packageTarget and optional dependenciesReinstall; repair lockfile if incomplete

Diagnose in the failing environment; keep the project's manager. Examples use npm.

node -p "JSON.stringify({node:process.version,exe:process.execPath,openssl:process.versions.openssl,platform:process.platform,arch:process.arch})"
node -p "typeof require('node:crypto').hash"
npm ls vite webpack rollup rolldown
npm config get omit

error:0308010C and unsupported hashing

The exact message is Error: error:0308010C:digital envelope routines::unsupported, verified in the community report, checked 2026-10-20.

OpenSSL can reject legacy webpack hashing or other algorithms/key sizes; inspect the stack. Node's explanation, checked 2026-10-20, describes the restrictions and a temporary legacy provider.

Update the owning framework/build dependency within its supported range, then run npm run build. If webpack output hashing is the caller and your version supports it, set output.hashFunction to xxhash64 and rebuild. Loaders/plugins can have separate hash calls. Official webpack reference, checked 2026-10-20.

Temporary POSIX-shell diagnostic:

NODE_OPTIONS=--openssl-legacy-provider npm run build

Do not persist this globally or downgrade to unsupported Node as the durable fix. It neither adds crypto.hash nor installs bindings.

crypto.hash is not a function

The exact message is TypeError: crypto.hash is not a function. byunginhb's issue reproduces it; maintainer bluwy gives Vite's Node range. Checked 2026-10-20.

The executing Node lacks the API. IDE/terminal/CI can select different binaries. Select supported LTS meeting Vite/templates, update pins and CI images, reopen the shell, then run:

node --version
node -p "typeof require('node:crypto').hash"
npm ci --include=optional
npm run dev
npm run build

function alone is insufficient. Read Node's API history and Vite's engine requirement, checked 2026-10-20.

Do not patch Vite, polyfill crypto, enable the legacy provider or delete healthy lockfiles.

Missing Rollup Linux native package

The verified error prefix is Error: Cannot find module @rollup/rollup-linux-x64-gnu. 0xBeycan's discussion shows it with an optional-dependency explanation, checked 2026-10-20.

The selected native package is absent/unresolvable. Check omission flags, incomplete lockfiles and copied host node_modules. Rollup's loader selects OS/architecture and glibc versus musl; npm's bug report documents missing platform optional dependencies. Checked 2026-10-20.

On target run npm ci --include=optional, then node -e "require('rollup')" and npm run build. npm ci cleans installation but cannot repair missing lockfile entries. Use regeneration below only if necessary. Official npm ci docs, checked 2026-10-20.

Do not force GNU bindings into musl/Alpine, install arbitrary binding versions, share node_modules across platforms, or delete lockfiles every CI run.

Missing Rolldown Windows native binding

The exact message is Error: Cannot find module '@rolldown/binding-win32-x64-msvc'. See RobTheTeacher's report, checked 2026-10-20.

In the Windows project run npm ci --include=optional, then node -e "import('rolldown').then(() => console.log('loaded'))" and npm run build. Official Rolldown troubleshooting, checked 2026-10-20, explains missing optional packages and symlinked configs resolving another project's install. Inspect the nested cause first.

If the binary exists but cannot load, inspect its loader error and Windows protection history. One reply reports quarantine; it is not proof of your cause. Do not disable antivirus, add broad exclusions, substitute Linux bindings or blindly approve scripts. Rolldown warns its preserve-symlinks workaround is incompatible with pnpm.

For an incomplete npm lockfile, Rolldown documents removing it and node_modules before reinstalling. Preserve both in a disposable checkout without existing backup names:

node -e "const f=require('node:fs'); if(f.existsSync('node_modules')) f.renameSync('node_modules','node_modules.before-repair'); f.renameSync('package-lock.json','package-lock.before-repair.json')"
npm install --include=optional
git diff -- package-lock.json
npm ci --include=optional
npm run build

Review this dependency re-resolution and test all targets. Do not replace pnpm/yarn lockfiles with this npm recipe.

What the community says

  • Vite #20287 includes DanielMwamba's reported upgrade/reinstall success; bluwy's maintainer answer specifies supported Node. Checked 2026-11-15.
  • Vite #15532 includes DavidAtInleague's report that keeping optional dependencies fixed CI; others warn against repeated lockfile deletion. Several causes, not a universal fix; checked 2026-10-20.
  • Vite #21846 offers conflicting optional-dependency and antivirus explanations. Its small discussion supports investigating both; checked 2026-10-20.

A prompt to give your agent

Read the linked official source and maintainer answer; do not guess. Record the exact message, Node path/version, target, dependency chain and nested cause. Choose one repair, preserve manager/lockfile, explain re-resolution, rerun the failing command and report remaining failures. Never disable endpoint protection.

Limits

No installs, builds, migrations, containers or bindings were tested. All four supplied strings were verified; additional suffixes/variants are unverified. No latest patch/affected interval is claimed. Thin Windows evidence cannot establish quarantine as the general cause. Community results are attributed, not reproduced. Browser externalization, stale chunks and ESM require errors are separate jobs.

Started from a post by @byunginhb, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# error:0308010C: how to fix Node/Vite upgrade failures?
Summary: As of October 2026, Node/Vite upgrade failures need different repairs: remove legacy hashing for OpenSSL errors, use a supported Node runtime for crypto.hash, or restore the target native optional dependency for Rollup/Rolldown. Match the exact error before changing the lockfile.
Copy for agent
get the whatworks thread node-vite-crypto-hash-openssl-rollup-rolldown-upgrade-errors and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread node-vite-crypto-hash-openssl-rollup-rolldown-upgrade-errors
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks