j3k0 / crm-cli

Customer Relationship Management from your Terminal
57 stars 8 forks source link

Trouble adding a contact. #4

Open Abu-Daud opened 2 years ago

Abu-Daud commented 2 years ago
crm add-contact

New Contact:
------------
/usr/local/lib/node_modules/crm-cli/node_modules/enquirer/lib/types/array.js:38
  throw new Error('At least one choice must be selectable');

I also tried

 crm add-contact Mary Jane

Same kind of error. Would be interested to see a bit more of a getting started guide.

jonch070 commented 1 month ago

Hello! having similar error for adding contact and on init

New Contact:
------------
/opt/homebrew/lib/node_modules/crm-cli/node_modules/enquirer/lib/types/array.js:38
      throw new Error('At least one choice must be selectable');
            ^

Error: At least one choice must be selectable
    at AutoComplete.reset (/opt/homebrew/lib/node_modules/crm-cli/node_modules/enquirer/lib/types/array.js:38:13)
    at async AutoComplete.initialize (/opt/homebrew/lib/node_modules/crm-cli/node_modules/enquirer/lib/types/array.js:25:5)
    at async /opt/homebrew/lib/node_modules/crm-cli/node_modules/enquirer/lib/prompt.js:246:7

Node.js v22.9.0

and with init

node:internal/fs/promises:1198
    validateStringAfterArrayBufferView(data, 'data');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Object.writeFile (node:internal/fs/promises:1198:5)
    at FileSystemAdapter.<anonymous> (/opt/homebrew/lib/node_modules/crm-cli/build/database/adapters/filesystem.js:119:31)
    at Generator.next (<anonymous>)
    at /opt/homebrew/lib/node_modules/crm-cli/build/database/adapters/filesystem.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/homebrew/lib/node_modules/crm-cli/build/database/adapters/filesystem.js:27:12)
    at FileSystemAdapter.create (/opt/homebrew/lib/node_modules/crm-cli/build/database/adapters/filesystem.js:118:16)
    at main (/opt/homebrew/lib/node_modules/crm-cli/crm:110:24) {
  code: 'ERR_INVALID_ARG_TYPE'
}