0%

hexo_error_at_node:internal/main/run_main_module

今天本想更新几篇文章到博客上,结果在上传生成后 界面出现问题

1
2
3
4
5
6
7
8
INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
(node:2633) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2633) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:2633) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:2633) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:2633) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:2633) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency

node --trace-warnings a 查看一下

1
2
3
4
5
6
7
8
9
10
11
12
13
node:internal/modules/cjs/loader:959
throw err;
^

Error: Cannot find module '/Users/XXX/Blog/Hexo/a'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

解决方案 https://github.com/nodejs/help/issues/2644

1
2
3
4
1.npm cache clean --force(这条命令无法用 则使用 npm cache verify)
2.delete node_modules folder
3.delete package-lock.json file
4.npm install

之后便可以顺利运行了

欢迎关注我的其它发布渠道

------------- 💖 🌞 本 文 结 束 😚 感 谢 您 的 阅 读 🌞 💖 -------------