Cannot find module 'conventional-changelog-conventionalcommits' when using parserPreset
See original GitHub issueWhen I try to add parserPreset
to my commitlint.config.js
, I receive the following error:
C:\Program Files\nodejs\node_modules\@commitlint\cli\lib\cli.js:119
throw err;
^
Error: Cannot find module 'conventional-changelog-conventionalcommits'
at Function.Module._resolveFilename (module.js:538:15)
at resolveFileName (C:\Program Files\nodejs\node_modules\@commitlint\cli\node_modules\resolve-from\index.js:29:39)
at resolveFrom (C:\Program Files\nodejs\node_modules\@commitlint\cli\node_modules\resolve-from\index.js:43:9)
at module.exports (C:\Program Files\nodejs\node_modules\@commitlint\cli\node_modules\resolve-from\index.js:46:47)
at Object.<anonymous> (C:\Program Files\nodejs\node_modules\@commitlint\cli\node_modules\@commitlint\load\lib\index.js:54:54)
at <anonymous>
Affected packages
- cli
- core
- prompt
- config-angular
Steps to Reproduce (for bugs)
- Install
@commitlint/cli
,@commitlint/config-conventional
(and optionally my plugincommitlint-plugin-cleanfeet
) - Ensure
parserPreset: 'conventional-changelog-conventionalcommits',
is present incommitlint.config.js
- Execute
echo 'chore: Stuff' | commitlint
commitlint.config.js
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
extends: ['@commitlint/config-conventional'],
plugins: ['cleanfeet'],
rules: {
'footer-format': [
2,
'always',
[
'^BREAKING CHANGE: .*',
'^[a-zA-Z0-9-]+: .*',
'^[a-zA-Z0-9-]+ #.*'
]
],
'footer-max-occurrence-breaking-change': [2, 'always', { max: 1, regex: /^BREAKING CHANGE: .*$/ }]
}
};
Your Environment
Executable | Version |
---|---|
commitlint --version |
8.2.0 |
git --version |
2.16.1.windows.4 |
node --version |
v8.9.4 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
conventional-changelog-conventionalcommits - npm
Start using conventional-changelog-conventionalcommits in your project by running `npm i conventional-changelog-conventionalcommits`.
Read more >reactjs - Jest - Referencing local files gives package link error
When I try and run jest, I get the following error that makes my test file fail: ... Is it something to do...
Read more >'--format', 'pretty', gives me Error: Cannot find module '/project ...
Error: Cannot find module '/project/pretty. I feel like I am missing something simple but cannot find anything about this. --format pretty.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think your NPM might be a bit confused because of
commitlint
and@commitlint/cli
.commitlint
is just an alias package that calls@commitlint/cli
. Could you try installing@commitlint/cli@next
withoutcommitlint@next
?Yes you were right. Thank you very much for your help.