rtm-cli icon indicating copy to clipboard operation
rtm-cli copied to clipboard

Plugins not loaded

Open daniel-barrows opened this issue 5 years ago • 5 comments

I'm running rtm 1.5.1 retrieved from a pre-built binary. I can't get plugins to load. I have been trying both rtm-cli-plugin-example and rtm-plugin-export. I tried manually setting the plugin directory path in the configuration file to no avail. Is this an issue with pre-built binaries or what?

daniel-barrows avatar Mar 25 '19 21:03 daniel-barrows

I just tested the export plugin with a pre-built binary, so that shouldn't be an issue. What OS are you using?

This is the configuration file I have:

{
  "dateformat": "ddd mmm d",
  "hideDue": 14,
  "aliases": [
    {
      "name": "today",
      "description": "Display tasks with a priority, due or completed today, or overdue",
      "command": "lsp",
      "args": "(not priority:none and status:incomplete) or completed:today or (dueBefore:tomorrow and status:incomplete)"
    }
  ],
  "plugins": [
    "~/.rtm.plugins/"
  ]
}

Then, the ~/.rtm.plugins/ directory contains:

.
└── plugin-export
    ├── LICENSE
    ├── README.md
    ├── export.js
    ├── index.js
    ├── node_modules
    │   ├── rtm-api 
    │   └── rtm-cli 
    └── package.json

dwaring87 avatar Apr 07 '19 21:04 dwaring87

I'm having a similar problem on Mac OS. My plugin-export directory doesn't contain the 'node_modules' directory. Is that something that's created at runtime? Or did I miss a node config step?

chriswil avatar Apr 26 '19 14:04 chriswil

In regards to plugin-export, it requires rtm-cli and rtm-api as peer dependencies. Therefore, I think in order for it to work as it is, it needs to be placed into the rtm-cli directory. Otherwise, those require statements will cause the package to fail and the plugin will not be loaded. I could be wrong but that's the only way I could get it to work.

jondcoleman avatar Feb 19 '20 14:02 jondcoleman

.
└── plugin-export
    ├── LICENSE
    ├── README.md
    ├── export.js
    ├── index.js
    ├── node_modules
    │   ├── rtm-api 
    │   └── rtm-cli 
    └── package.json

This doesn't make sense with how that package is set up because the packages are listed as peer dependencies rather than pure dependencies, so even if you npm install, you won't get those packages in this plugin directory.

jondcoleman avatar Feb 19 '20 14:02 jondcoleman

Ubuntu 20.10 : I fixed this by running sudo npm install rtm-cliin the export sub directory of ~.rtm.plugins/ I suspect this may have been a sledgehammer approach !

jonhind avatar Jan 18 '21 14:01 jonhind