Does not work after npm i and package config
See original GitHub issueHi!
TLDR; IRFM, ran it, then tried to run git cz
, it failed with an unfortunate but epic error,
D:\work\MyBlog\C\c2-bin>git cz
module.js:338
throw err;
^
Error: Cannot find module 'D:\work\MyBlog\C\c2-bin\node_modules\commitizen\bin\git-cz'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
The longer story
Running windows 7 with node and npm such
D:\work\MyBlog\C\c2-bin>npm -v
2.11.3
D:\work\MyBlog\C\c2-bin>node -v
v0.12.7
I have run D:\work\MyBlog\C\c2-bin>npm install -g commitizen
,
then D:\work\MyBlog\C\c2-bin>commitizen init cz-conventional-changelog --save --save-exact
Then i configured my local package.json
file to add
,"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
}
Where did i get it wrong ?
Thanks !
D:\work\MyBlog\C\c2-bin>commitizen init cz-conventional-changelog --save --save-exact
Attempting to initialize using the npm package cz-conventional-changelog
Error: A previous adapter is already configured. Use --force to override
D:\work\MyBlog\C\c2-bin>commitizen init cz-conventional-changelog --save --save-exact --force
Attempting to initialize using the npm package cz-conventional-changelog
npm WARN using --force I sure hope you know what you are doing.
npm WARN package.json c2-bin@1.0.0 No repository field.
npm WARN package.json c2-bin@1.0.0 license should be a valid SPDX license expression
cz-conventional-changelog@1.1.4 node_modules\cz-conventional-changelog
└── word-wrap@1.1.0
{this.config was unexpected at this time.
D:\work\MyBlog\C\c2-bin> "C:\Users\d1m\AppData\Roaming\npm\node_modules\commitizen\node_modules\.bin\\node.exe" "C:\Users\d1m\AppData\Roaming\npm\node_modules\commitizen\node
_modules\.bin\\..\json\lib\json.js" -I -f D:\work\MyBlog\C\c2-bin\package.json -e 'if(!this.config) {this.config={};}; if(!this.config.commitizen) { this.config.commitizen={};}
; this.config.commitizen.path="./node_modules/cz-conventional-changelog"'
D:\work\MyBlog\C\c2-bin>git cz
module.js:338
throw err;
^
Error: Cannot find module 'D:\work\MyBlog\C\c2-bin\node_modules\commitizen\bin\git-cz'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
D:\work\MyBlog\C\c2-bin>
Issue Analytics
- State:
- Created 8 years ago
- Comments:29 (13 by maintainers)
Top Results From Across the Web
npm config set command not working properly - Stack Overflow
i set the default config for the package.
Read more >Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. This can be caused by...
Read more >[BUG] Overrides are not updating after running npm install
I'm seeing this issue on 8.5.5 currently; removing node_modules and package-lock.json and doing npm install does install the overridden ...
Read more >Manage npm packages - Visual Studio (Windows)
Visual Studio helps you to manage packages using the Node.js package ... For help resolving issues with npm packages, see Troubleshooting.
Read more >npm packages in the Package Registry - GitLab Docs
When an npm package is not found in the Package Registry, the request is ... If you get this error, one of the...
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
Hi @jimthedev ,
amazing, i can make it work now : ) Happy.
But i need to report about something i found weird.
git cz
will not work,git-cz
does work here.The steps i followed
et voila : )
Will dig about adapters now !!
Thanks again.
kind of forgotten to close, sorry : )