[Question] SyntaxError: Parsing JSON at <path> for commitizen config failed:
See original GitHub issue1. Summary
I can’t begin to use commitizen globally in my Windows.
2. Environment
- Windows 10 Enterprise LTSB 64-bit EN,
- Node.js 9.4.0,
- npm 5.6.0.
3. Steps to reproduce
D:\SashaBranchReleaseIt>npm install -g commitizen
C:\Users\SashaChernykh\AppData\Roaming\npm\git-cz -> C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\bin\git-cz
C:\Users\SashaChernykh\AppData\Roaming\npm\commitizen -> C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\bin\commitizen
+ commitizen@2.9.6
updated 1 package in 8.143s
D:\SashaBranchReleaseIt>npm install -g cz-conventional-changelog
+ cz-conventional-changelog@2.1.0
updated 1 package in 1.217s
D:\SashaBranchReleaseIt>echo %HOME%
C:\Users\SashaChernykh
I create a file .czrc
in C:\Users\SashaChernykh
directory. It content:
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
I run git cz
command in any my git repository.
4. Expected behavior
Successful usage commitizen
.
5. Actual behavior
D:\SashaBranchReleaseIt>git cz
C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\configLoader\getContent.js:56
throw error;
^
SyntaxError: Parsing JSON at C:\Users\SashaChernykh\.czrc for commitizen config failed:
at JSON.parse (<anonymous>)
at C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\configLoader\getContent.js:40:17
at readConfigContent (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\configLoader\getContent.js:46:18)
at getConfigContent (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\configLoader\getContent.js:78:17)
at loader (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\configLoader\loader.js:62:56)
at Object.load (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\commitizen\configLoader.js:17:35)
at Object.bootstrap (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\dist\cli\git-cz.js:26:70)
at Object.<anonymous> (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\commitizen\bin\git-cz.js:2:34)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
npm "failed to parse json" - Stack Overflow
Mostly, this error is due to a syntax error in package.json file. In my case, the opening curly brace for dependencies object in...
Read more >Error Failed to parse json-This is not a bug in npm - Edureka
When I'm trying to install express with npm I always get the following error: Failed to parse json No data, empty input at...
Read more >eslint: failed to load config next/babel to extend from. - You.com ...
I was missing the package @vue/prettier/@typescript-eslint, after installing the package version matching my package.json, I was good. Hope that helps someone.
Read more >保守性の高いコミットメッセージを書こう - Zenn
[Question] SyntaxError: Parsing JSON at <path> for commitizen config failed: に対するエラーは以下のissueで議論されていました。
Read more >The 10 tools I wish I knew when I started working with Python
Learn about how venvs, flake8, black, isort, pytest, commitizen, ... 12 min read ... then add the snippet below to your .vscode/settings.json
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’m sorry, stupid error.
Valid
.czrc
content is:Thanks.
What is the difference?