-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should czg and cz-git must install root in monorepo? #68
Comments
感觉是 czg 与 cz-git 必须安装在根目录下,即使使用 public-hoist-pattern 提升至根目录也不行 |
你的意思是想把 czg 依赖放在 sub package中? 不过为什么呢,如果你是想把配置项作为一个npm package,大可以直接写配置,根packages.json引用并继承使用 |
单独把 .commitlintrc.js 的配置放在 sub package 中。问题定位到了,是我这边自己的问题,我先解决下。感谢回复🙏 |
这主要和 pnpm 使用有关与 node 运行特性有关:
基于以上两点:
|
好的~ |
满足你🤪 |
✅ Checklist
📄 System Info
🔎 Description
Concise Description
我使用 pnpm 创建了一个 monorepo 项目,当我在根目录下安装 cz-git 与 czg 的时候一切正常。当我把与 commitlint 相关的操作封装成一个包放在 packages 目录下名为 commitlint-config 时,在根目录下执行
pnpm --filter=@mercur9/commitlint-config exec czg
时报错,报错如下:no such file or directory, scandir '/xxx/_/commitlint-config/packages'
这个时候我尝试在 npmrc 中将 commitlint 的包全部提升至根部成功后,执行
pnpm exec czg
还是报同样的错误。这很让人疑惑 😹
🔗 Reproduction link / repo:
No response
The text was updated successfully, but these errors were encountered: