hyoban / release-it-pnpm

Run release-it with pnpm
https://release-it-pnpm.vercel.app
MIT License
17 stars 0 forks source link

ERROR whatBump is not a function #17

Closed chrisjbrown closed 3 months ago

chrisjbrown commented 3 months ago

Describe the bug

I've tried using this package with all different settings. Including what is on the documentation page. But I always get this error.

ERROR whatBump is not a function

Seems like whatBump is a function in conventional-recommended-bump but that's about all I've been able to discern https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-recommended-bump#readme

Reproduction

No response

System Info

System:
    OS: macOS 14.4
    CPU: (14) arm64 Apple M3 Max
    Memory: 229.23 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.6.1 - ~/.asdf/installs/nodejs/21.6.1/bin/node
    Yarn: 1.22.22 - ~/.asdf/installs/nodejs/21.6.1/bin/yarn
    npm: 10.2.4 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 9.3.0 - ~/.asdf/installs/nodejs/21.6.1/bin/pnpm
  Browsers:
    Chrome: 127.0.6533.100
    Safari: 17.4

Used Package Manager

pnpm

Validations

hyoban commented 3 months ago

Can you share a minimal reproduction? Thanks!

chrisjbrown commented 3 months ago

actually my minimal reproduction doesn't have the same issue... i'll try and compare and see what my project is doing differently. will re-open if I can isolate the issue

chrisjbrown commented 3 months ago

For anyone else who sees this error. For me the issue was somehow related to another dependency installing conventional-changelog-conventionalcommits version < 8. Event though both a 7.x and an 8.x version were installed the preset loader function was always selecting the 7.x version resulting in this error. I wasn't able to recreate the issue as the reproduction I made would choose the 8.x version.

Not sure what causes one version to be selected over another. Explicitly adding conventional-changelog-conventionalcommits@8.x within my projects dev dependencies has resolved the issue for me.