Skip to content

git cz fails when not in the root directory #187

Closed
@pmcelhaney

Description

@pmcelhaney

When I try to run git cz and I'm not in the root directory I get an error.

~/code/cz-cli/src (run-from-anywhere)
$ git cz
./node_modules/cz-conventional-changelog /Users/patrickmcelhaney/code/cz-cli/src
/usr/local/lib/node_modules/commitizen/dist/commitizen/adapter.js:185
    throw error;
    ^

Error: Could not resolve /Users/patrickmcelhaney/code/cz-cli/src/node_modules/cz-conventional-changelog
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.require.resolve (internal/module.js:23:19)
    at resolveAdapterPath (/usr/local/lib/node_modules/commitizen/dist/commitizen/adapter.js:182:20)
    at gitCz (/usr/local/lib/node_modules/commitizen/dist/cli/strategies/git-cz.js:77:35)
    at Object.bootstrap (/usr/local/lib/node_modules/commitizen/dist/cli/git-cz.js:32:27)
    at Object.<anonymous> (/usr/local/lib/node_modules/commitizen/bin/git-cz.js:2:34)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions