oclif/config

The cli project throws Cannot find module 'globby' error

Closed this issue · 0 comments

The CLI projects throws Cannot find module 'globby' error. Here's the error I'm getting when I simply run a command:

$ ./bin/run hello
(node:23379) [MODULE_NOT_FOUND] Error Plugin: my-test-cli: Cannot find module 'globby'
module: @oclif/config@1.13.1
task: not loading commands, globby not found
plugin: my-test-cli
root: /home/kabir/opensource/my-test-cli
See more details with DEBUG=*
Error Plugin: my-test-cli: Cannot find module 'globby'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.resolve (internal/modules/cjs/helpers.js:33:19)
    at Plugin.get commandIDs [as commandIDs] (/home/kabir/opensource/my-test-cli/node_modules/@oclif/config/lib/plugin.js:64:40)
    at Plugin._manifest (/home/kabir/opensource/my-test-cli/node_modules/@oclif/config/lib/plugin.js:151:28)
module: @oclif/config@1.13.1
task: not loading commands, globby not found
plugin: my-test-cli
root: /home/kabir/opensource/my-test-cli

This happened after I cleaned up my package.json file to contain only @oclif/* and my core dependencies.

Here's my question - is this package globby required to function any oclif based CLI application? If yes, then should it not be in oclif's dependencies list? I didn't find it there.

config/package.json

Lines 7 to 12 in b0c2c9e

"dependencies": {
"@oclif/errors": "^1.0.0",
"@oclif/parser": "^3.8.0",
"debug": "^4.1.1",
"tslib": "^1.9.3"
},

This means the user always needs to install globby in their CLI, or else it won't work.
Please suggest if this was intentional or is an issue. If it is, then I guess moving this from your devDependencies to dependencies would solve it for us.

Thanks!