【hexo博客问题】

windows下使用gitbash即可使用

其他bash会产生权限问题

npm install失败

bash 复制代码
$ npm install
npm error code ENOENT
npm error syscall open
npm error path F:\pf_project\blog_pf\package.json
npm error errno -4058
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory,
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: 

解决方法

进如正确的blog项目文件夹目录执行即可,就会生成package.json文件

npm淘宝镜像cnpm安装使用(最新版)

直接替换软件源

在开发 react-native 的时候,不要使用 cnpm,cnpm 安装的模块路径比较奇怪,package 不能正常识别。所以,为了方便开发,我们最好是直接永久使用淘宝的镜像源.

  • 直接命令行的设置

    bash 复制代码
    npm config set registry http://registry.npmmirror.com
  • 手动修改设置

    打开.npmrc文件(C:\Program Files\nodejs\node_modules\npm\npmrc,没有的话可以使用git命令行建一个( touch .npmrc),用cmd命令建会报错)

    增加 registry=http://registry.npmmirror.com 即可。

  • 如果需要恢复成原来的官方地址只需要执行如下命令:

    bash 复制代码
    npm config set registry https://registry.npmjs.org
  • 检测是否安装成功:

    bash 复制代码
     npm config get registry
相关推荐
fpcc4 小时前
工具使用—git diff命令分析说明
git·工具
console.log('npc')4 小时前
Git 删除指定提交记录操作指南
git
随风丶飘5 小时前
[特殊字符] 告别“update“和“fix bug“——Smart Git Commit LLM 让 AI 帮你写专业的 Git 提交信息
人工智能·git·bug
yanlaifan5 小时前
git clone时候指定换行符
git
小小安于乱9 小时前
解决IDEA的git插件pull代码冲突但右下角不提示消息问题
java·git·intellij-idea
ITKEY_11 小时前
git 命令行操作回退到指定版本
git
New_Horizons66613 小时前
Git 操作(使用git-commit-template)
git
慕容引刀16 小时前
或许你真的需要这个Git神器:让团队提交文案终于对齐了
人工智能·git·vscode·自然语言处理·github
jjh+++(求关注版)17 小时前
git-命令速查清单
git
yanlaifan1 天前
git版本管理工具中的回车换行转换逻辑
git