martindstone / pagerduty-cli

A command line interface for PagerDuty
MIT License
91 stars 13 forks source link

Missing oclif dependency after v0.1.6 #53

Open daniel-sampliner opened 1 year ago

daniel-sampliner commented 1 year ago

I recently tried to upgrade from v0.1.5 to v0.1.15, however building failed with:

yarn run v1.22.19
$ rm -rf lib && tsc -b && oclif manifest && oclif readme --multi
/bin/sh: oclif: not found
error Command failed with exit code 127.

Manually bisecting, I found that this started breaking after commit 7c4aac324bfb96c26db3cc8fbff69e75d766d3b0, specifically the removal of @oclif/dev-cli from devDependencies.

Disclaimer: I don't know the first thing about javascript development or packaging.

But what worked for me was to add oclif (the replacement since @oclif/dev-cli has been deprecated) into devDependencies:

diff --git a/package.json b/package.json
index 63d40c4..913f542 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
     "tslib": "^2.4.0"
   },
   "devDependencies": {
+    "oclif": "^3",
     "@oclif/test": "^2.1.0",
     "@types/chai": "^4",
     "@types/fs-extra": "^9.0.1",
martindstone commented 1 year ago

Thank you for this observation... most people didn't notice it I think because they are using the pre built packages and it seems you are building the package yourself... are you doing development or customization on it? Just curious why you're building it yourself...

Anyway, the change exactly as you say happened along with the change in the oclif framework from version 1 to version 2. So I definitely will make a change like the one you did to make it work for you... thanks for reporting!

daniel-sampliner commented 1 year ago

Just curious why you're building it yourself...

"Why" is a tough question; I wish I had reasons most of the choices in life I've made :upside_down_face:. In this specific case, I'm just rebuilding it to play nicer with my Linux distribution's native packaging method.

Thanks for the quick response!