Repository navigation
Node 25.7.0 runtime failure from yargs v17 (require is not defined) #708
Description
Activity
- addedbugSomething isn't workingSomething isn't workingupstreamCaused in upstream, not in this repoCaused in upstream, not in this repo
on Mar 2, 2026 Thank you for organizing the issue clearly 👍
As workarounds, you can either use a standalone binary (bundles a compatible version of Node.js) or use a stable release of Node.js (even-numbered versions).
The root cause is expected to be resolved by an update to yargs, #670. However, since it includes incompatibilities with older versions of Node.js, it would be difficult to merge the update immediately. Currently we have to wait for the upstream patch release.
+1 on this issue. Experienced it with Arch Linux. Temporarily downgraded nodejs to 25.4 again - leaving the instructions here in case they are useful: https://wiki.archlinux.org/title/Downgrading_packages
Reacted by Daniel KriestenIt seems Node.js is addressing an incompatible change in nodejs/node#62083. It will probably be fixed in a future version update.
IMO: To avoid issues caused by the incompatibility from the latest version, it's recommended to use the stable version (even-numbered major versions, LTS) of Node for common use, rather than development versions (odd-numbered major versions).
UPDATE: Form Node.js v26, you will no longer need to consider whether it is odd or even version: https://nodejs.org/blog/announcements/evolving-the-nodejs-release-schedule
Reacted by Stefan HärterNode.js 25.8.1 has been released, with including fixed module resolution.
Note
An upcoming Node.js 26+ will reintroduce the renewed module resolution behavior, which revives an error in the current yargs v17. yargs is currently working on forward compatibility: yargs/yargs#2514
Reacted by Stefan HärterNode.js v26 has been released! However, the fix PR of yargs is not yet merged and shipped, so this error is re-introduced in Node.js 26.
Thank you for the heads up 😊
Fixed in v4.4.0. We're getting an error because Marp CLI uses yargs via
require('yargs/yargs'), so we've bundled yargs into Marp CLI to avoid this.Note
yargs has been released the patch version for v16 and v17 to resolve this problem. Even if used older version of Marp CLI in Node.js 26, this error should not be reproduced if installed the latest v17 yargs release by following the semver range specified in
package.jsonReacted by Stefan Härter- marked Node 26.5.1 runtime failure from yargs v17 (require is not defined) #737 as a duplicate of this issue
on Aug 1, 2026
After Node 25.7.0 rollout in Homebrew (
homebrew/homebrew-core#269249),marp-clifails at runtime due toyargsv17.Error:
Homebrew failure evidence:
Local repro with Homebrew bottle:
marp --versionfails with the same stackUpstream context:
Could you cut a fix/release compatible with Node 25.7+ (or otherwise advise a supported workaround)?