Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

The cli project throws Cannot find module 'globby' error #101

Closed
kabirbaidhya opened this issue Mar 24, 2020 · 0 comments · Fixed by #102
Closed

The cli project throws Cannot find module 'globby' error #101

kabirbaidhya opened this issue Mar 24, 2020 · 0 comments · Fixed by #102

Comments

@kabirbaidhya
Copy link
Contributor

kabirbaidhya commented Mar 24, 2020

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/[email protected]
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/[email protected]
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!

@kabirbaidhya kabirbaidhya changed the title The multi commands cli project throws Cannot find module 'globby' error The cli project throws Cannot find module 'globby' error Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant