anomaly / github-secrets-cli

A command line tool for managing Github project secrets
https://www.npmjs.com/package/@anomalyhq/github-secrets-cli
Apache License 2.0
12 stars 2 forks source link

Error: Cannot find module 'cli-ux' (looks like cli-ux is not saved in the package.json) #7

Closed evankford closed 4 years ago

evankford commented 4 years ago

Describe the issue On installation using npm i -g, ghs is missing the cli-ux package (looks like it wasn't saved in the package.json)

Version: @anomalyhq/github-secrets-cli/1.0.1 darwin-x64 node-v14.13.0

Steps To Reproduce

  1. Install using npm install -g @anomaly/github-secrets-cli
  2. Check that ghs is installed using ghs -v, see that it's correctly installed
  3. Try ghs config:set
  4. Returns:
     Error: Cannot find module 'cli-ux' ...
    Require stack:
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/lib/commands/config/set.js
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/config/lib/plugin.js
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/config/lib/config.js
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/config/lib/index.js
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/command/lib/command.js
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/command/lib/index.js
    - /usr/local/lib/node_modules/@anomalyhq/github-secrets-cli/bin/run
    Code: MODULE_NOT_FOUND

Expected behavior Should prompt for organization: Which organisation does the repo belong to?:. This behavior works as expected after installing cli-ux in the ghs package directory.

Logs See Above!

brendon1555 commented 4 years ago

Thanks for this. You are correct, cli-ux does appear to be missing from the dependencies. Seems I missed this locally as it is a dependency of a devDependency.