Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not loading commands, globby not found on zli apps invocation #204

Open
itamarbareket opened this issue Sep 1, 2023 · 0 comments
Open

Comments

@itamarbareket
Copy link

Expectations

To be able to run zcli apps:server dist command.

Reality

This error, (with DEBUG=*)

❯ npx zcli apps:server
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli/.oclif.manifest.json +0ms
  config reading user plugins pjson /Users/username/.local/share/@zendesk/zcli/package.json +0ms
  config loadJSON /Users/username/.local/share/@zendesk/zcli/package.json +0ms
(node:91991) [ERR_REQUIRE_ESM] Error Plugin: @zendesk/zcli [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Work/zendesk-my-awesome-app/node_modules/globby/index.js from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js not supported.
Instead change the require of index.js in /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js to a dynamic import() which is available in all CommonJS modules.
module: @oclif/core@1.26.2
task: not loading commands, globby not found
plugin: @zendesk/zcli
root: /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli
See more details with DEBUG=*
(Use `node --trace-warnings ...` to show where the warning was created)
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Work/zendesk-my-awesome-app/node_modules/globby/index.js from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js not supported.
Instead change the require of index.js in /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js to a dynamic import() which is available in all CommonJS modules.
    at get commandIDs [as commandIDs] (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:150:22)
    at Plugin._manifest (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:237:47)
    at async Plugin.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:127:25)
    at async Config.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:85:9)
    at async Config.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:79:9)
    at async Object.run (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/main.js:42:20)
module: @oclif/core@1.26.2
task: not loading commands, globby not found
plugin: @zendesk/zcli
root: /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli
See more details with DEBUG=*
  config loading plugins [
  '@oclif/plugin-help',
  '@oclif/plugin-autocomplete',
  '@oclif/plugin-not-found',
  '@oclif/plugin-warn-if-update-available',
  '@zendesk/zcli-apps',
  '@zendesk/zcli-themes'
] +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli/package.json +0ms
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-help +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-help/package.json +0ms
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-not-found +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-not-found/package.json +0ms
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-warn-if-update-available +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-warn-if-update-available/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-not-found/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-warn-if-update-available/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/package.json +0ms
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-autocomplete +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-autocomplete/package.json +0ms
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-themes +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-themes/package.json +0ms
  config reading core plugin /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-apps +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-apps/package.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-themes/oclif.manifest.json +0ms
  config:@oclif/plugin-warn-if-update-available using manifest from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-warn-if-update-available/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-apps/oclif.manifest.json +0ms
  config:@oclif/plugin-help using manifest from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
  config:@oclif/plugin-not-found using manifest from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-not-found/oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-themes/.oclif.manifest.json +0ms
  config loadJSON /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-apps/.oclif.manifest.json +0ms
(node:91991) [ERR_REQUIRE_ESM] Error Plugin: @zendesk/zcli-themes [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Work/zendesk-my-awesome-app/node_modules/globby/index.js from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js not supported.
Instead change the require of index.js in /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js to a dynamic import() which is available in all CommonJS modules.
module: @oclif/core@1.26.2
task: not loading commands, globby not found
plugin: @zendesk/zcli-themes
root: /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-themes
See more details with DEBUG=*
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Work/zendesk-my-awesome-app/node_modules/globby/index.js from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js not supported.
Instead change the require of index.js in /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js to a dynamic import() which is available in all CommonJS modules.
    at get commandIDs [as commandIDs] (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:150:22)
    at Plugin._manifest (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:237:47)
    at async Plugin.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:127:25)
    at async /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:467:17
    at async Promise.all (index 5)
    at async Config.loadPlugins (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:455:9)
    at async Config.loadCorePlugins (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:152:13)
    at async Config.loadPluginsAndCommands (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:144:9)
    at async Config.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:138:9)
    at async Config.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:79:9)
    at async Object.run (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/main.js:42:20)
module: @oclif/core@1.26.2
task: not loading commands, globby not found
plugin: @zendesk/zcli-themes
root: /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-themes
See more details with DEBUG=*
(node:91991) [ERR_REQUIRE_ESM] Error Plugin: @zendesk/zcli-apps [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Work/zendesk-my-awesome-app/node_modules/globby/index.js from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js not supported.
Instead change the require of index.js in /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js to a dynamic import() which is available in all CommonJS modules.
module: @oclif/core@1.26.2
task: not loading commands, globby not found
plugin: @zendesk/zcli-apps
root: /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-apps
See more details with DEBUG=*
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Work/zendesk-my-awesome-app/node_modules/globby/index.js from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js not supported.
Instead change the require of index.js in /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js to a dynamic import() which is available in all CommonJS modules.
    at get commandIDs [as commandIDs] (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:150:22)
    at Plugin._manifest (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:237:47)
    at async Plugin.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/plugin.js:127:25)
    at async /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:467:17
    at async Promise.all (index 4)
    at async Config.loadPlugins (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:455:9)
    at async Config.loadCorePlugins (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:152:13)
    at async Config.loadPluginsAndCommands (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:144:9)
    at async Config.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:138:9)
    at async Config.load (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/config/config.js:79:9)
    at async Object.run (/Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/core/lib/main.js:42:20)
module: @oclif/core@1.26.2
task: not loading commands, globby not found
plugin: @zendesk/zcli-apps
root: /Users/username/Work/zendesk-my-awesome-app/node_modules/@zendesk/zcli-apps
See more details with DEBUG=*
  config:@oclif/plugin-autocomplete using manifest from /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json +0ms
  config config done +19ms
  config start init hook +0ms
  zcli:@oclif/plugin-warn-if-update-available:hooks:init start (require) /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-warn-if-update-available/lib/hooks/init/check-update.js +0ms
  zcli:@oclif/plugin-warn-if-update-available:hooks:init done +2ms
  config init hook done +12ms
  config runCommand apps:server [] +0ms
  config start command_not_found hook +0ms
  zcli:@oclif/plugin-not-found:hooks:command_not_found start (require) /Users/username/Work/zendesk-my-awesome-app/node_modules/@oclif/plugin-not-found/lib/index.js +0ms
 ›   Warning: apps:server is not a zcli command.
Did you mean help? [y/n]: 

Steps to Reproduce

  1. Yarn install
  2. run zcli apps:server dist
  3. cry

Resolution

I was able to work around the issue by pinning "globby": "11.1.0" in my package.json.

Issue details

  • Command: zcli apps:server dist
  • Version: 1.0.0-beta.38
  • OS: Mac, I don't know if it reproduces on other OS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant