commitizen / commitizen/cz-cli

Add `yarn pnp` support

未关闭
#995 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
17.5k
派生
566
平均合并
8 小时 16 分钟
30 天内合并 PR
1

描述

Currently if you are using yarn pnp with this package, you will (understandably) get this error message:
```
Attempting to initialize using the npm package cz-conventional-changelog
Error: Could not locate node_modules in your project's root directory. Did you forget to npm init or npm install?
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
```
This is after installing commitizen locally via:
```
yarn add -D commitizen
```
and then running to following init command:
```
yarn dlx commitizen init cz-conventional-changelog --yarn --save-dev --save-exact
```

This is because `yarn pnp` does not use node_modules folder to install it's packages.

贡献指南

打开贡献指南

调研方向

使用所示的 Yarn PnP 安装和 init 命令重现该故障,然后跟踪检查是否存在名为 node_modules 的目录的初始化路径。完成的标准是同一命令能够在 Yarn PnP 下完成,且不需要 node_modules;如果 repository 中有相关的测试位置,请为该工作流添加或更新覆盖范围。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
cli, tooling
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。