avatar

travis-ci在Node.js v14.0下自动构建hexo报错

参考https://vensing.com/a-bug-in-nodejs-v14/

报错情况

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1.27s$ hexo clean
(node:5971) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5971) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:5971) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:5971) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:5971) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:5971) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
322The command "hexo clean" exited with 0.
6.83s$ hexo g
(node:5991) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5991) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
INFO Start processing
INFO Files loaded in 3.93 s
(node:5991) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:5991) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency

解决办法

在travis.yml里面的Node.js版本那里把stable改成指定版本号就行,错误已经提交至hexo项目的issue,估计过一段时间就能修复

附travis.yml中的language用法

1
2
3
language: node_js
node_js:
- 7

其中版本号可填如下内容:

  • node latest stable Node.js release

  • lts/* latest LTS Node.js release

  • 14 latest 14.x release

  • 13 latest 13.x release

  • 12 latest 12.x release

  • 11 latest 11.x release

  • 10 latest 10.x release

参考自https://docs.travis-ci.com/user/languages/javascript-with-nodejs/

吐槽

有点想换GitHub Actions了…

文章作者: HPShark
文章链接: https://www.happyshark.cn/2020/05/22/travis-ci%E5%9C%A8Node.js-v14.0%E4%B8%8B%E8%87%AA%E5%8A%A8%E6%9E%84%E5%BB%BAhexo%E6%8A%A5%E9%94%99/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Happy Shark

评论