Git 2.20安装hexo出现的问题 npm: command not found


今天安装hexo出现了一个问题,我的Git和nodejs都是安装在D盘下面的,通过Git bash here安装hexo出现问题,下面写一下解决方法

打开安装路径下的D盘中的Git Bash here

在这里插入图片描述

在打开的界面中输入一下代码:

1、安装hexo
//安装hexo
hp@hp-pc MINGW64 /
$ npm install hexo-cli -g
//运行结果
C:\Users\hp\AppData\Roaming\npm\hexo -> C:\Users\hp\AppData\Roaming\npm\node_modules\hexo-cli\bin\hexo
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\hexo-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
2、将hexo部署到Git page的deployer
//hexo部署
hp@hp-pc MINGW64 /
$ npm install hexo-deployer-git
//运行结果
npm WARN saveError ENOENT: no such file or directory, open 'D:\Myblog\Git\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'D:\Myblog\Git\package.json'
npm WARN babel-eslint@10.0.1 requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN Git No description
npm WARN Git No repository field.
npm WARN Git No README data
npm WARN Git No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ hexo-deployer-git@1.0.0
added 204 packages from 400 contributors and audited 2254 packages in 15.598s
found 0 vulnerabilities

下载npm文件夹代码如下:

// 下载npm文件到桌面
hp@hp-pc MINGW64 ~/Desktop
$ git clone --recursive git://github.com/isaacs/npm.git
//运行结果
Cloning into 'npm'...
remote: Enumerating objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 17.87 KiB | 99.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.

参考博客地址如下:
1、https://blog.csdn.net/grave2015/article/details/79961843
2、https://blog.csdn.net/daocaoren92wq/article/details/64444532

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值