Skip to content

[Bug]: CLI generate store throws when Yarn is not installed (Windows)Β #6905

Open
@DavidDeSloovere

Description

@DavidDeSloovere

Describe the Bug

CLI throws error when, probably because Yarn is not installed
npx @vue-storefront/cli generate store

Current behavior

CLI throws ugly error

Expected behavior

CLI should return a user friendly message that Yarn is required needs to be installed.

Steps to reproduce

don't not have yarn installed

npx @vue-storefront/cli generate store

enter name for project
select magento 2
install magento? no

What version of Vue Storefront are you using?

latest cli

What version of Node.js are you using?

16.20.0

What browser (and version) are you using?

What operating system (and version) are you using?

Windows

Relevant log output

β—‡  πŸ€“ Do you want to install Magento 2 locally on your computer? (BETA)
β”‚  No
β”‚
β—‡  πŸ™Œ Node.js version is compatible
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn yarn ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn yarn',
  path: 'yarn',
  spawnargs: [ '-v' ]
}

Able to fix / change the documentation?

  • Yes
  • No

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugBug reports

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions