aframevr / aframe-site

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

Update version of the site generator hexo #533

Closed vincentfretin closed 2 months ago

vincentfretin commented 5 months ago

We currently use hexo 3.2.2, although the build seems to work fine on node 22, we may try to update the hexo version, see https://hexo.io/docs/#Required-Node-js-version

vincentfretin commented 5 months ago

The aframe bot is using

npm run bumpdocs
npm run generate

commands, see https://github.com/supermedium/a-frobot/blob/master/lib/deployAframeSite.js#L32-L33 The generate command is executing hexo generate

I only have one warning with momentjs, the build seems to succeed but actually all the index.html files in public directory are empty when I executed it with node 22.

INFO  Files loaded in 1.42 s
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 07-12-2019, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:324:25)
    at configFromString (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:2613:19)
    at configFromInput (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:3056:13)
    at prepareConfig (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:3039:13)
    at createFromConfig (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:3006:44)
    at createLocalOrUTC (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:3100:16)
    at createLocal (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:3104:16)
    at hooks (/home/vincentfretin/workspace/aframe-site/node_modules/moment/moment.js:16:29)
    at Object.<anonymous> (/home/vincentfretin/workspace/aframe-site/scripts/helpers.js:121:10)
    at Object.wrapper [as blog_date] (/home/vincentfretin/workspace/aframe-site/node_modules/lodash/lodash.js:4991:19)
    at eval (eval at exports.compile (/home/vincentfretin/workspace/aframe-site/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:2353)
    at Query.forEach (/home/vincentfretin/workspace/aframe-site/node_modules/warehouse/lib/query.js:42:5)
    at eval (eval at exports.compile (/home/vincentfretin/workspace/aframe-site/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:1641)
    at eval (eval at exports.compile (/home/vincentfretin/workspace/aframe-site/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:37:1779)
    at /home/vincentfretin/workspace/aframe-site/node_modules/ejs/lib/ejs.js:255:15
    at Theme._View.View._compiled (/home/vincentfretin/workspace/aframe-site/node_modules/hexo/lib/theme/view.js:127:30)
    at View.render (/home/vincentfretin/workspace/aframe-site/node_modules/hexo/lib/theme/view.js:29:15)
    at /home/vincentfretin/workspace/aframe-site/node_modules/hexo/lib/hexo/index.js:387:25
    at tryCatcher (/home/vincentfretin/workspace/aframe-site/node_modules/bluebird/js/release/util.js:16:23)
    at /home/vincentfretin/workspace/aframe-site/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/home/vincentfretin/workspace/aframe-site/node_modules/hexo/lib/hexo/router.js:134:3)
    at Readable.read (node:internal/streams/readable:737:12)
...
INFO  2295 files generated in 12 s
vincentfretin commented 5 months ago

@dmarcos I updated hexo in #539. All seems to work.