node报错
挂在github上的hexo博客之前是在WIN7下的,现在基本使用WIN10索性搞过来
安装完Git 和 Node之后,试着发布一篇测试,结果报错找不到环境,一想也对,新系统环境得对接一下至少,于是参照我之前写的:
2020最新WIN环境github + hexo搭建个人博客
搞完,试着发布,发现报错,一查发现是由于node版本太高了,于是换了低版本问题解决。于是就有了这篇。
补记:
rsgdxp@DESKTOP-A3UOIS3 MINGW64 /c/hexo
$ hexo d
INFO Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
fatal: detected dubious ownership in repository at 'C:/hexo/.deploy_git'
'C:/hexo/.deploy_git' is owned by:
(inconvertible) (S-1-5-21-3378737320-2756843768-2847192813-500)
but the current user is:
DESKTOP-A3UOIS3/rsgdxp (S-1-5-21-3253263988-200691010-3797055721-1001)
To add an exception for this directory, call:
git config --global --add safe.directory C:/hexo/.deploy_git
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (C:\hexo\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.cp.emit (C:\hexo\node_modules\cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
rsgdxp@DESKTOP-A3UOIS3 MINGW64 /c/hexo
$ ^C
rsgdxp@DESKTOP-A3UOIS3 MINGW64 /c/hexo
$ git config --global --add safe.directory C:/hexo/.deploy_git
发布时报如上错误,那么按照提示搞就好 了 。