cnpm install -g n # Downloading n to D:\MUYI Program Files\Nodejs\node_global\node_modules\n_tmp # Copying D:\MUYI Program Files\Nodejs\node_global\node_modules\n_tmp\_n@5.0.2@n to D:\MUYI Program Files\Nodejs\node_global\node_modules\n # Installing n's dependencies to D:\MUYI Program Files\Nodejs\node_global\node_modules\n/node_modules # All packages installed (used 8ms(network 4ms), speed 0B/s, json 0(0B), tarball 0B) # [n@5.0.2] link D:\MUYI Program Files\Nodejs\node_global\n@ -> D:\MUYI Program Files\Nodejs\node_global\node_modules\n\bin\n n stable # /bin/bash: D:\MUYI Program Files\Nodejs\node_global\node_modules\n\bin\n: 没有那个文件或目录
strange, but I decide to leave it alone.= =
Update hexo
As I decide to reinstall Hexo, why note update it to the latest version
1
npm i hexo-cli -g
this may take a really long time.
As what I am scared about, it goes wrong
Error Info
1 2 3 4 5 6 7 8 9 10 11 12
npm WARN checkPermissions Missing write access to D:\MUYI Program Files\Nodejs\node_global\node_modules\hexo-cli\node_modules\is-number\node_modules\kind-of npm WARN checkPermissions Missing write access to D:\MUYI Program Files\Nodejs\node_global\node_modules\hexo-cli\node_modules\is-number\node_modules npm ERR! path D:\MUYI Program Files\Nodejs\node_global\node_modules\hexo-cli\node_modules\is-number\node_modules\kind-of npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall access npm ERR! enoent ENOENT: no such file or directory, access 'D:\MUYI Program Files\Nodejs\node_global\node_modules\hexo-cli\node_modules\is-number\node_modules\kind-of' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR! D:\MUYI Program Files\Nodejs\node_cache\_logs\2019-08-12T08_42_25_532Z-debug.log
</details>
After Googleing some blogs, I decide to reinstall the Hexo totally.
npm WARN tarball tarball data for swig-templates@^2.0.3 (sha1-a0xDtGIXXfKo2oV6IEM3nsbqb9A=) seems to be corrupted. Trying one more time. npm ERR! code EPERM npm ERR! syscall unlink npm ERR! path D:\PROGRAMME PROJECT\Blog\node_modules\.staging\swig-templates-c7f20818\package.json npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, unlink 'D:\PROGRAMME PROJECT\Blog\node_modules\.staging\swig-templates-c7f20818\package.json' npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\PROGRAMME PROJECT\Blog\node_modules\.staging\swig-templates-c7f20818\package.json' npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\PROGRAMME PROJECT\Blog\node_modules\.staging\swig-templates-c7f20818\package.json' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'D:\\PROGRAMME PROJECT\\Blog\\node_modules\\.staging\\swig-templates-c7f20818\\package.json' }, npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'D:\\PROGRAMME PROJECT\\Blog\\node_modules\\.staging\\swig-templates-c7f20818\\package.json\'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'D:\\PROGRAMME PROJECT\\Blog\\node_modules\\.staging\\swig-templates-c7f20818\\package.json', npm ERR! parent: 'hexo' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.
But I feel like that I just failed to uninstall hexo.
Initialize folder of blog
make a folder for blog files.
1 2
mkdir BenatureBlog cd BenatureBlog
initialize hexo (this may take a bit long time )
1 2 3 4
hexo init cnpm install
npm install hexo-deployer-git --save
1 2 3
hexo g hexo s hexo d
Configure
then modify the _config.yml to configure.
Mathjax
find mathjax config in blog\themes\next\_config.yml and modify
1 2 3 4 5 6 7 8 9
cnpm uninstall hexo-renderer-marked --save # npm ERR! code EINVALIDTAGNAME # npm ERR! Invalid tag name "^undefined": Tags may not have any characters that encodeURIComponent encodes. # # npm ERR! A complete log of this run can be found in: # npm ERR! C:\Users\ben04\AppData\Roaming\npm-cache\_logs\2019-08-13T02_04_50_890Z-debug.log
cnpm i hexo-renderer-pandoc --save hexo clean
As I fialed to uninstall some packages, so I go to /node_modules/ and found the coresspond folder and deleted it directily.
then go to node_modules\kramed\lib\rules\inline.js