aframevr / aframe-site

:a: Official A-Frame site.
https://aframe.io/
MIT License
99 stars 141 forks source link

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

Closed vincentfretin closed 2 weeks ago

vincentfretin commented 2 weeks ago

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?

dmarcos commented 2 weeks ago

Here it is https://github.com/aframevr/node-multidep Thanks

vincentfretin commented 2 weeks ago

Please merge https://github.com/aframevr/node-multidep/pull/1 and I'll do a PR in this repo to update the package.json to use the fixed version.

vincentfretin commented 2 weeks ago

PR #534 includes the fixed node-multidep version.

dmarcos commented 2 weeks ago

thanks for looking at this. the site generation script uses the following commands:

npm run bumpdocs npm run generate

the website files are generated in the public folder.

It doesn't seem to work with newer versions of node

vincentfretin commented 2 weeks ago

Ok, so that's really the hexo generate command the issue, I indeed have all the index.html files empty, that's what you're seeing too? https://github.com/aframevr/aframe-site/issues/533#issuecomment-2160123515

dmarcos commented 2 weeks ago

yes. index files are empty