git提交ERROR: This version of pnpm requires at least Node.js v16.4错误解决方案

2023年09月18日

使用 git 提交的时候,提示了以下错误:

ERROR: This version of pnpm requires at least Node.js v16.14
The current version of Node.js is v16.10.0
Visit https://r.pnpm.io/comp to see the list of past pnpm versions with respective Node.js version support.
husky - pre-commit hook exited with code 1 (error)

出现这个问题,主要是因为 husky 插件对会做一些校验。

解决办法,有2个

第一: 提交的时候关闭校验:

git commit -m '提交' --no-verfiy

第二: 关闭git hook

git config --unset core.hooksPath

哈哈,感觉有些暴力,最好还是根据提示进行规范性的提交。

© 1987 - 2023 张晓刚 版权所有

浙ICP备16002143号-1