Skip to content

Angular 14: globby not found #12

Description

@nilsel

In a Angular 14 project we get this error when running iwa:

task: not loading commands, globby not found

After some searching, seems like globby is a dependency of @oclif/config@1.18.5.

Temporary fix: install older version of globby: 11.0.1
Found here: forcedotcom/cli#1339 (comment)

Full trace (with export DEBUG=* set):

b2b-user-onboarding-web@0.0.0 iwa:gen
iwa generate --env=development ./src/index.html ./src/development.index.html

@oclif/config reading core plugin /Users/username/path/b2b-user-onboarding-web/node_modules/iwa-cli +0ms
@oclif/config loadJSON /Users/username/path/b2b-user-onboarding-web/node_modules/iwa-cli/package.json +0ms
@oclif/config loadJSON /Users/username/path/b2b-user-onboarding-web/node_modules/iwa-cli/oclif.manifest.json +1ms
@oclif/config loadJSON /Users/username/path/b2b-user-onboarding-web/node_modules/iwa-cli/.oclif.manifest.json +1ms
@oclif/config reading user plugins pjson /Users/username/.local/share/iwa-cli/package.json +0ms
@oclif/config loadJSON /Users/username/.local/share/iwa-cli/package.json +281ms
(node:47939) [ERR_REQUIRE_ESM] Error Plugin: iwa-cli [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/path/b2b-user-onboarding-web/node_modules/globby/index.js from /Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js not supported.
Instead change the require of index.js in /Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js to a dynamic import() which is available in all CommonJS modules.
module: @oclif/config@1.18.5
task: not loading commands, globby not found
plugin: iwa-cli
root: /Users/username/path/b2b-user-onboarding-web/node_modules/iwa-cli
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/path/b2b-user-onboarding-web/node_modules/globby/index.js from /Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js not supported.
Instead change the require of index.js in /Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js to a dynamic import() which is available in all CommonJS modules.
at Plugin.get commandIDs [as commandIDs] (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js:157:22)
at Plugin._manifest (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js:246:28)
at async Plugin.load (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/plugin.js:134:25)
at async Config.load (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/config.js:41:9)
at async Object.load (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/config.js:374:5)
at async Function.Command.run (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/command/lib/command.js:161:20)
module: @oclif/config@1.18.5
task: not loading commands, globby not found
plugin: iwa-cli
root: /Users/username/path/b2b-user-onboarding-web/node_modules/iwa-cli
See more details with DEBUG=*
@oclif/config config done +1ms
@oclif/config start init hook +0ms
@oclif/config init hook done +0ms
iwa init version: @oclif/command@1.8.18 argv: [ 'generate', '--env=development', './src/index.html', './src/development.index.html' ] +0ms
@oclif/config runCommand generate [ '--env=development', './src/index.html', './src/development.index.html' ] +9ms
@oclif/config start command_not_found hook +0ms
@oclif/config command_not_found hook done +0ms
Error: command generate not found
at Config.runCommand (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/config/lib/config.js:169:19)
at async Main.run (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/command/lib/main.js:28:9)
at async Main._run (/Users/username/path/b2b-user-onboarding-web/node_modules/@oclif/command/lib/command.js:43:20)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions