fix: error TS2307: Cannot find module 'conventional-commits-parser' or its corresponding type declarations.
knocte opened this issue · comments
Expected Behavior
Should compile (like it was compiling 2 days ago).
Current Behavior
node_modules/@commitlint/types/lib/lint.d.ts(1,30): error TS2307: Cannot find module 'conventional-commits-parser' or its corresponding type declarations.
node_modules/@commitlint/types/lib/parse.d.ts(1,38): error TS2307: Cannot find module 'conventional-commits-parser' or its corresponding type declarations.
node_modules/@commitlint/types/lib/rules.d.ts(1,29): error TS2307: Cannot find module 'conventional-commits-parser' or its corresponding type declarations.
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
No response
Steps to Reproduce
- Have some commitlint plugins in a repo.
- Install @commitlint/types package via
npm install --verbose @commitlint/types
Log:
npm verb cli /usr/bin/node /usr/bin/npm
npm info using npm@9.2.0
npm info using node@v18.13.0
npm verb title npm install @commitlint/types
npm verb argv "install" "--loglevel" "verbose" "@commitlint/types"
npm verb logfile logs-max:10 dir:/github/home/.npm/_logs/2024-02-28T09_22_20_081Z-
npm verb logfile /github/home/.npm/_logs/2024-02-28T09_22_20_081Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/@commitlint%2ftypes 122ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/chalk 22ms (cache miss)
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 53ms
npm http fetch GET 200 https://registry.npmjs.org/semver/-/semver-6.3.1.tgz 54ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz 60ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@commitlint/types/-/types-19.0.0.tgz 80ms (cache miss)
added 2 packages, changed 1 package, and audited 301 packages in 1s
34 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm verb exit 0
npm info ok
- Try to compile with
tsc
Context
No response
commitlint --version
19.0.0
git --version
2.40.1
node --version
18.13.0
Also happens with latest version?
Also happens with latest version?
I'm not pinning to a specific old version, so it's always installing the last. And the last time my CI ran was 5 mins ago. So: yes.
I'm trying to find what went wrong here, and I've found this npm pkg: conventional-commits-parser
. How is it possible that last version of it (see https://www.npmjs.com/package/conventional-commits-parser?activeTab=versions) was 6 months ago? Last commits of it are not being released?
Is this PR related? #3929
Was waiting till this major version settles till merghing dep PRs again.
We only use @types/conventional-commits-parser
as devDependency
for its types, for TypeScript users, they may have to install @types/conventional-commits-parser
by themselves. Maybe we should mark it as dependency instead for @commitlint/types
considering it's only for typings.