8000 [Error] unable to find configuration file (using it in non JS Project) · Issue #234 · leoforfree/cz-customizable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Error] unable to find configuration file (using it in non JS Project) #234
Open
@lamyergeier

Description

@lamyergeier

Install

$ npm i -g commitizen cz-customizable

$ file /home/lamy/opt/.nvm/versions/node/v20.7.0/lib/node_modules/cz-customizable/
/home/lamy/opt/.nvm/versions/node/v20.7.0/lib/node_modules/cz-customizable/: directory

$ command cat ~/.czrc 
{"path":"/mnt/Data/opt/.nvm/versions/node/v20.7.0/lib/node_modules/cz-customizable"}

My repository

Note: I have added cz-config.js to repository head

$ la
total 24K
755 drwxr-xr-x. 7 lamy lamy 4.0K 2024-04-28 01:21 .git
644 -rw-r--r--. 1 lamy lamy   17 2024-04-27 00:33 .gitignore
644 -rw-r--r--. 1 lamy lamy 2.3K 2024-04-28 01:19 Podcast.json
644 -rw-r--r--. 1 lamy lamy   57 2024-04-27 23:46 Podcast_tag.txt
644 -rw-r--r--. 1 lamy lamy 2.5K 2024-04-28 01:17 cz-config.js

Error

$ cz
cz-cli@4.3.0, cz-customizable@7.0.0

Unable to find a configuration file. Please refer to documentation to learn how to set up: https://github.com/leonardoanalista/cz-customizable#steps "
Cannot read properties of null (reading 'subjectLimit')
$ cz-customizable
cz-customizable standalone version
Unable to find a configuration file. Please refer to documentation to learn how to set up: https://github.com/leonardoanalista/cz-customizable#steps "
/mnt/Data/opt/.nvm/versions/node/v20.7.0/lib/node_modules/cz-customizable/index.js:16
    config.subjectLimit = config.subjectLimit || 100;
                                 ^

TypeError: Cannot read properties of null (reading 'subjectLimit')
    at Object.prompter (/mnt/Data/opt/.nvm/versions/node/v20.7.0/lib/node_modules/cz-customizable/index.js:16:34)
    at Object.<anonymous> (/mnt/Data/opt/.nvm/versions/node/v20.7.0/lib/node_modules/cz-customizable/standalone.js:19:5)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

Node.js v20.7.0

Note

I get the same error when I put cz-config.js inside ${HOME} instead of the repository (as above).

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

      0