安装hexo的参考教程如下:
https://blog.csdn.net/sinat_37781304/article/details/82729029
https://www.yunyoujun.cn/share/how-to-build-your-site/
在npm install环节出现报错如下:
搜索了'node' is not recognized as an internal or external command,
operable program or batch file.的解决方法,修改过环境变量,依旧失败
且访问localhost:4000界面如下:
按照搜索引擎上常用的方法试过了,又出现一些其它bug,一一解决后还是这个问题很困扰人。也卸载重装好几次了。
本人目前只有大一,很不专业,完全不懂问题出在哪里,不知道尝试解决的时候有没有又弄出什么bug,希望见谅呜呜呜。
希望有大神可以解答(●'◡'●)
你在 windows 跑 Linux 版本,当然有问题。你装 NodeJS:
再试试。
Git for windows: https://git-scm.com/download/win
NodeJS 把 我的 Python 给换成了 3.9.1。如果用旧版的要小心啦。
D:\hexo>npm -v
6.14.11
D:\hexo>node -v
v14.15.4
D:\hexo>python
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z
安装 HEXO:npm install -g hexo-cli
D:\hexo>npm install -g hexo-cli
C:\Users\Homan\AppData\Roaming\npm\hexo -> C:\Users\Homan\AppData\Roaming\npm\node_modules\hexo-cli\bin\hexo
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\hexo-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ hexo-cli@4.2.0
added 65 packages from 337 contributors in 7.79s
D:\hexo>npm install hexo
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ hexo@5.3.0
updated 1 package and audited 194 packages in 2.678s
12 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
D:\hexo>hexo init myblog
INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
←[32mINFO ←[39m Install dependencies
added 188 packages from 443 contributors and audited 194 packages in 5.134s
15 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
INFO Start blogging with Hexo!
D:\hexo>cd myblog
D:\hexo\myblog>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 5 packages from 1 contributor and audited 194 packages in 1.071s
15 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
D:\hexo\myblog>hexo server
INFO Validating config
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
(node:35664) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:35664) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:35664) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:35664) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:35664) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:35664) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
启动资源和性能监视器
把错误信息复制粘贴出来
其实就是版本的问题,可能是你node的版本太低