{"action":"created","issue":{"url":"https://api.github.com/repos/commitizen/cz-cli/issues/42","labels_url":"https://api.github.com/repos/commitizen/cz-cli/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/commitizen/cz-cli/issues/42/comments","events_url":"https://api.github.com/repos/commitizen/cz-cli/issues/42/events","html_url":"https://github.com/commitizen/cz-cli/issues/42","id":113311895,"number":42,"title":"Does not work after npm i and package config","user":{"login":"maboiteaspam","id":530732,"avatar_url":"https://avatars.githubusercontent.com/u/530732?v=3","gravatar_id":"","url":"https://api.github.com/users/maboiteaspam","html_url":"https://github.com/maboiteaspam","followers_url":"https://api.github.com/users/maboiteaspam/followers","following_url":"https://api.github.com/users/maboiteaspam/following{/other_user}","gists_url":"https://api.github.com/users/maboiteaspam/gists{/gist_id}","starred_url":"https://api.github.com/users/maboiteaspam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maboiteaspam/subscriptions","organizations_url":"https://api.github.com/users/maboiteaspam/orgs","repos_url":"https://api.github.com/users/maboiteaspam/repos","events_url":"https://api.github.com/users/maboiteaspam/events{/privacy}","received_events_url":"https://api.github.com/users/maboiteaspam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-26T09:10:37Z","updated_at":"2015-10-26T11:37:11Z","closed_at":null,"body":"Hi!\r\n\r\n__TLDR__; IRFM, ran it, then tried to run `git cz`, it failed with an unfortunate but epic error,\r\n```sh\r\nD:\\work\\MyBlog\\C\\c2-bin>git cz\r\nmodule.js:338\r\n    throw err;\r\n          ^\r\nError: Cannot find module 'D:\\work\\MyBlog\\C\\c2-bin\\node_modules\\commitizen\\bin\\git-cz'\r\n    at Function.Module._resolveFilename (module.js:336:15)\r\n    at Function.Module._load (module.js:278:25)\r\n    at Function.Module.runMain (module.js:501:10)\r\n    at startup (node.js:129:16)\r\n    at node.js:814:3\r\n```\r\n\r\n__The longer story__\r\n\r\nRunning windows 7 with node and npm such\r\n```\r\nD:\\work\\MyBlog\\C\\c2-bin>npm -v\r\n2.11.3\r\n\r\nD:\\work\\MyBlog\\C\\c2-bin>node -v\r\nv0.12.7\r\n```\r\n\r\nI have run `D:\\work\\MyBlog\\C\\c2-bin>npm install -g commitizen `, \r\nthen `D:\\work\\MyBlog\\C\\c2-bin>commitizen init cz-conventional-changelog --save --save-exact`\r\n\r\nThen i configured my local `package.json` file to add\r\n```json\r\n  ,\"config\": {\r\n    \"commitizen\": {\r\n      \"path\": \"node_modules/cz-conventional-changelog\"\r\n    }\r\n  }\r\n```\r\n\r\nWhere did i get it wrong ? \r\n\r\n\r\nThanks !\r\n\r\n\r\n```\r\n\r\nD:\\work\\MyBlog\\C\\c2-bin>commitizen init cz-conventional-changelog --save --save-exact\r\nAttempting to initialize using the npm package cz-conventional-changelog\r\nError: A previous adapter is already configured. Use --force to override\r\n\r\nD:\\work\\MyBlog\\C\\c2-bin>commitizen init cz-conventional-changelog --save --save-exact --force\r\nAttempting to initialize using the npm package cz-conventional-changelog\r\nnpm WARN using --force I sure hope you know what you are doing.\r\nnpm WARN package.json c2-bin@1.0.0 No repository field.\r\nnpm WARN package.json c2-bin@1.0.0 license should be a valid SPDX license expression\r\ncz-conventional-changelog@1.1.4 node_modules\\cz-conventional-changelog\r\n└── word-wrap@1.1.0\r\n{this.config was unexpected at this time.\r\n\r\nD:\\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\r\n_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={};}\r\n; this.config.commitizen.path=\"./node_modules/cz-conventional-changelog\"'\r\n\r\nD:\\work\\MyBlog\\C\\c2-bin>git cz\r\nmodule.js:338\r\n    throw err;\r\n          ^\r\nError: Cannot find module 'D:\\work\\MyBlog\\C\\c2-bin\\node_modules\\commitizen\\bin\\git-cz'\r\n    at Function.Module._resolveFilename (module.js:336:15)\r\n    at Function.Module._load (module.js:278:25)\r\n    at Function.Module.runMain (module.js:501:10)\r\n    at startup (node.js:129:16)\r\n    at node.js:814:3\r\n\r\nD:\\work\\MyBlog\\C\\c2-bin>\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/commitizen/cz-cli/issues/comments/151106995","html_url":"https://github.com/commitizen/cz-cli/issues/42#issuecomment-151106995","issue_url":"https://api.github.com/repos/commitizen/cz-cli/issues/42","id":151106995,"user":{"login":"jimthedev","id":108938,"avatar_url":"https://avatars.githubusercontent.com/u/108938?v=3","gravatar_id":"","url":"https://api.github.com/users/jimthedev","html_url":"https://github.com/jimthedev","followers_url":"https://api.github.com/users/jimthedev/followers","following_url":"https://api.github.com/users/jimthedev/following{/other_user}","gists_url":"https://api.github.com/users/jimthedev/gists{/gist_id}","starred_url":"https://api.github.com/users/jimthedev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimthedev/subscriptions","organizations_url":"https://api.github.com/users/jimthedev/orgs","repos_url":"https://api.github.com/users/jimthedev/repos","events_url":"https://api.github.com/users/jimthedev/events{/privacy}","received_events_url":"https://api.github.com/users/jimthedev/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T11:37:11Z","updated_at":"2015-10-26T11:37:11Z","body":"Hi! Sorry to hear you're having trouble. Can you try using a this in your package.json?\r\n\r\n```\r\n  ,\"config\": {\r\n    \"commitizen\": {\r\n      \"path\": \"./node_modules/cz-conventional-changelog\"\r\n    }\r\n  }\r\n```"}}