环境与版本
- 系统:macOS Catalina 10.15.5
- Node: v14.0.0
- Hexo
- hexo: 4.2.1
- hexo-cli: 3.1.0
- os: Darwin 19.5.0 darwin x64
- node: 12.18.0
- v8: 7.8.279.23-node.37
- uv: 1.37.0
- zlib: 1.2.11
- brotli: 1.0.7
- ares: 1.16.0
- modules: 72
- nghttp2: 1.41.0
- napi: 6
- llhttp: 2.0.4
- http_parser: 2.9.3
- openssl: 1.1.1g
- cldr: 37.0
- icu: 67.1
- tz: 2019c
- unicode: 13.0
问题与报错
运行 ‘hexo g’ 之后提示如下:
(node:6563) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6563) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:6563) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:6563) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:6563) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:6563) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
解决方案
根据报错信息搜索,找到了 Hexo 下面 issue 一篇帖子:Warning: Accessing non-existent property ‘lineno’ of module exports inside circular dependency
于是在终端里输入了下面命令
brew uninstall node
brew install node@12
brew link --overwrite --force node@12
最终提示为
Linking /usr/local/Cellar/node@12/12.18.0... 3821 symlinks created
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/node@12/bin:$PATH"' >> ~/.zshrc
成功解决,顺利取得