Skip to content

[bug]: Can't install blocks-react-renderer package if husky isn't installed #40

Open
@vsimonovski

Description

@vsimonovski

What version of @strapi/blocks-react-renderer are you using?

  • Npm Version: 10.5.2
  • Node version: 20.13.1
  • React version: 18.3.1
  • blocks-react-renderer: 1.0.1

What's Wrong?

Once I do npm install @strapi/blocks-react-renderer react react-dom command inside FE project that doesn't have husky installed as a dependency I get the following error:

npm install @strapi/blocks-react-renderer react react-dom
npm ERR! code 127
npm ERR! path <PATH_TO_THE_FE_PROJECT>/node_modules/@strapi/blocks-react-renderer
npm ERR! command failed
npm ERR! command sh -c husky install
npm ERR! sh: husky: command not found

npm ERR! A complete log of this run can be found in: <PATH_TO_THE_LOG>

If I do npm install husky --save-dev and run npm install @strapi/blocks-react-renderer react react-dom command again everything is installed correctly.

To Reproduce

Create a new project with vite:
npm create vite@latest demo-project --template react-ts

Navigate to the project directory:
cd demo-project

Run npm install:
npm install

Try to install @strapi/blocks-react-renderer:
npm install @strapi/blocks-react-renderer react react-dom

Expected Behaviour

@strapi/blocks-react-renderer should be installed without having husky as a dev dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bug

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions