PaystackOSS/paystack-cli

CLI failing to start

Closed this issue · 2 comments

The login steps on the README don't seem to be working. Running paystack after installing the CLI throws an exception.

root@830cfa0ee265:/# paystack
paystack $ 

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module './paystack/apis'
Require stack:
- /usr/local/lib/node_modules/@paystack-oss/dev-cli/lib/helpers.js
- /usr/local/lib/node_modules/@paystack-oss/dev-cli/commands/webhook.js
- /usr/local/lib/node_modules/@paystack-oss/dev-cli/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@paystack-oss/dev-cli/lib/helpers.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/@paystack-oss/dev-cli/lib/helpers.js',
    '/usr/local/lib/node_modules/@paystack-oss/dev-cli/commands/webhook.js',
    '/usr/local/lib/node_modules/@paystack-oss/dev-cli/cli.js'
  ]
}

Steps to replicate using docker (also breaks outside of docker):

docker run -ti node:lts bash
npm install -g @paystack-oss/dev-cli
paystack

I'm having same issue on Debian environment running Node.js v17.9.0

The issue here isn't from you, but a typo in the code. Creating a pull request soon containing a fix for this.