为了节省硬盘空间,使用pnpm作为vue的管理命令行工具,导致git提交时出现如下问题
# git commit -m 添加配置不起作用
/root/.local/share/pnpm/store/v3/tmp/dlx-9631:
ERR_PNPM_FETCH_404 GET https://registry.npmjs.org/--no-install: Not Found - 404
This error happened while installing a direct dependency of /root/.local/share/pnpm/store/v3/tmp/dlx-9631
--no-install is not in the npm registry, or you have no permission to fetch it.
No authorization header was set for the request.
搜索到解决方案:https://github.com/typicode/husky-4-to-8
pnpm install husky@8 --save-dev \
&& pnpx husky-init \
&& pnpx -- github:typicode/husky-4-to-8 --remove-v4-config
运行完后即可正常提交了
在尝试使用pnpm作为vue项目的包管理器时,用户遇到了gitcommit失败的问题,错误信息显示为404NotFound,涉及npmregistry中的--no-install命令。为了解决这个问题,用户参照了GitHub上的解决方案,通过安装并更新husky到v8,以及移除v4配置,成功修复了提交问题。
6829

被折叠的 条评论
为什么被折叠?



