【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
相关推荐
逻辑棱镜5 小时前
Git 分支管理与提交信息规范 (v1.0)
git·github·团队开发·代码规范·敏捷流程
悦悦欧呐呐呐呐6 小时前
git 设置邮箱和用户名
git
正经教主6 小时前
【Git】Git06:Git 管理 Android 项目教程(含GitHub)
android·git
艾莉丝努力练剑10 小时前
【Git:多人协作】Git多人协作实战:从同分支到多分支工作流
服务器·c++·人工智能·git·gitee·centos·项目管理
liuyao_xianhui1 天前
版本控制器git--gdb/cgdb
linux·运维·服务器·git
徐同保1 天前
如何使用GitKraken把git项目迁移到另一个平台,并保存所有提交记录,例如把github上的项目,迁移到gitee
git·gitee·github
高小秋1 天前
项目开发使用 git工作流插件 -- jgitflow开发实践
git
tealcwu1 天前
【软件工程】浅析Git message, version, changelog之间的关系
git
五号厂房1 天前
Git Worktree 使用指南
git
秦jh_1 天前
【git】企业级开发模型
git