[GITHUB DESKTOP] 问题收集/解决

1、cygpath: command not found

出现类似Roaming/npm/commitlint: line 5: cygpath: command not found错误提示
yarn引起的问题(推荐方法3)

1. 添加`npx`。
   在项目根目录的`package.json`的`commit-msg`修改为**`npx commitlint -E HUSKY_GIT_PARAMS`**
2. 如果上面方法【1】不能解决
   找到`yarn`安装所在目录,如我本地的是`C:\Users\haoyi\AppData\Roaming\npm\node_modules\yarn\bin`,然后偷下懒,把`C:\Users\haoyi\AppData\Roaming\npm\node_modules`的`node_modules`整个包复制到报错的地方如`C:\Users\haoyi\AppData\Local\GitHubDesktop\app-2.8.2\resources\app\git`
3. 如果上面方法【1】不能解决,且`npm install -g yarn`还是不能解决,还可以直接找到如我本地GitHubDesktop的安装路径如:
   C:\Users\haoyi\AppData\Local\GitHubDesktop\app-2.8.2\resources\app\git
   然后在当前目录打开**git bash**,
   **执行**
   npm init -y
   npm i -g yarn
   目的其实就是在提交commit的时候可以当前目录找到`yarn`
2、Cannot find module /yarn.js

如果以下方法行不通,尝试【Ⅲ、GithubDesktop:cygpath: command not found】的方法【Ⅲ-3】。
出现类似Cannot find module /yarn.js错误提示

1、按键盘左下角“田”,找到yarn的文件位置
2、添加系统路径
image.png

你可能感兴趣的:([GITHUB DESKTOP] 问题收集/解决)