Skip to content

Creating projectError: spawn npm ENOENT #470

@stiks

Description

@stiks

Do you want to request a feature or report a bug?
Not sure if this is BUG or FEATURE

What is the current behaviour?
NPM is required to install preact using CLI, need an option to use yarn instead of npm or preact-cli should detect installed package manager

If the current behaviour is a bug, please provide the steps to reproduce.

$ preact create default frontend
ℹ INFO Assuming you meant preactjs-templates/default...
⠋ Creating projectError: spawn npm ENOENT

No issues if I'll install it by myself:

$ cd frontend && yarn install
... 
success Saved lockfile.
Done in 82.35s.

What is the expected behaviour?
CLI should detect installed package manager and use it.

If this is a feature request, what is motivation or use case for changing the behaviour?
NPM is dying, most of the people already using Yarn. I'm not asking to replace NPM with yarn, but would be good if CLI can detect installed package manager. It's hard to get Node and NPM in sync on Debian

Please mention other relevant information.

  • Node version v8.9.3
  • npm version not installed
  • Operating system Debian 9
  • CLI version v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions