-
Notifications
You must be signed in to change notification settings - Fork 560
Closed
Description
Hi!
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 [email protected] No repository field.
npm WARN package.json [email protected] license should be a valid SPDX license expression
[email protected] node_modules\cz-conventional-changelog
└── [email protected]
{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>