Skip to content

Error when executing "npm run installdocs" with node >= v14.18.0 #532

@vincentfretin

Description

@vincentfretin

With node 22

npm run installdocs

> aframe-site@0.0.0 installdocs
> multidep multidep.json && npm run copydocs

aframe 0.1.0: Installing
npm [ 'install', 'aframe@0.1.0' ]
⠙Error: npm exited with exit code null, signal SIGTERM
    at ChildProcess.<anonymous> (/home/vincentfretin/workspace/aframe-site/node_modules/multidep/index.js:117:28)
    at ChildProcess.emit (node:events:532:35)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

The issue is in node_modules/multidep/index.js line 111, that code:
https://github.com/ngokevin/node-multidep/blob/4b6d43d2d1cd805ebd9783e333818a4d0ec0b3e6/index.js#L111
timeout option here didn't do anything on node 6.17.1 because this option was introduced in node v14.18.0 and it's in milliseconds, not seconds. See https://nodejs.org/api/child_process.html#child_processspawncommand-args-options
I guess the intent was to have a timeout of 300 seconds here, so 5 min, we just need to change it to 300000 here.
Can you fork https://github.com/ngokevin/node-multidep in https://github.com/aframevr/ or your account @dmarcos so I can do a PR there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions