Closed
Description
node --run <npm-script>
is a new command in Node 22 that runs scripts defined in package.json, but has much less overhead (~200ms less) than npm run
: nodejs/node#52190
It should be very nice paired with Wireit for cached scripts.
But Wireit currently throws:
❌ wireit must be launched with "npm run" or a compatible command.
More info: Wireit could not identify the script to run.
node:child_process:965
throw err;
^
Error: Command failed: wireit
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at node:internal/main/run:74:1 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 62461,
stdout: null,
stderr: null
}
Node.js v22.0.0
It seems like npm --run
isn't setting npm_lifecycle_event, so that (or a detectable alternative) would need to be fixed on their end. Hopefully that's it.
Metadata
Metadata
Assignees
Labels
No labels