5.1错误警告集合

警告

1.警告日志

1
2
3
4
5
6
7
8
$ (node:10816) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
bash: syntax error near unexpected token `Warning:'
(node:10816) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency

出现原因:node版本过高

目前我用的是

1
2
$ node -v
v14.17.0

解决办法:

参考:Warning: Accessing non-existent property xxxx of module exports inside –CSDN博客

解决:

搜索到项目中文件: \node_modules\stylus\lib\nodes\index.js ,代码最前面加入一下:

1
2
3
exports.lineno = null;
exports.column = null;
exports.filename = null;

如果用everything搜索这个目录的时候,会有两个文件,一个里面没有这三行代码,加进去

另一个有这三行代码,不用管。

错误

1.创建新的文章

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
yinhanghang@DESKTOP-6DJJQFB MINGW64 /g/hexo/themes/next (master)
$ hexo new 4.4建立相册
Usage: hexo <command>

Commands:
help Get help on a command.
init Create a new Hexo folder.
version Display version information.

Global Options:
--config Specify config file instead of using _config.yml
--cwd Specify the CWD
--debug Display all verbose messages in the terminal
--draft Display draft posts
--safe Disable all plugins and scripts
--silent Hide output on console

For more help, you can use 'hexo help [command]' for the detailed information
or you can check the docs: http://hexo.io/docs/

选错了文件夹**/g/hexo/themes/next (master)**

应该是**/g/hexo**

2.hexo clean && hexo g && hexo s

1
# YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 5, column 1:
  1. 冒号:一定要用英文的
  2. 冒号后面一定要加空格
  3. 单词一定不要写错

3.一直打开git bash 有错误及时发现