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

mockup local make install fails during npx yarn husky install step #1427

Closed
acsr opened this issue Feb 12, 2025 · 2 comments
Closed

mockup local make install fails during npx yarn husky install step #1427

acsr opened this issue Feb 12, 2025 · 2 comments

Comments

@acsr
Copy link

acsr commented Feb 12, 2025

make install fails with an error on an macOS Sequoia 15.3 M1 machine:

  1. Clone repo master https://github.com/plone/mockup/releases/tag/5.2.0 latest in master branch
  2. run make install

Error:

...
# Install pre commit hook
npx yarn husky install
Usage Error: Couldn't find a script named "husky".

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
make: *** [install] Error 1

manual npx husky install works.

I changed the Makefile to:

YARN   ?= npx yarn
NPX   ?= npx

.PHONY: install
stamp-yarn install:
    $(YARN) install
    # Install pre commit hook
    # $(NPX) husky install
    @# We have checked in the .husky files, so no need to add the commitlint hook again.
    @# $(NPX) husky add .husky/commit-msg "npx yarn commitlint --edit $1"
    touch stamp-yarn

Then the install runs through.

At first sight the prerequisite pre-commit was misiing and resulted in this Pull Request for the README.md :
#1426

But it turns out as a different issue.

The first commit after the install fails and did not finish with this error:

git commit -m "experimental fix for husky install"
Usage Error: Couldn't find a script named "commitlint".

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
husky - commit-msg hook exited with code 1 (error)

Context

This arises in the context of trying to test the new storybook-demo branch by @ninanoleto during the Alpine City Sprint 2025 but not in this branch!

@acsr acsr moved this to in progress in Alpine City Sprint 2025 Feb 13, 2025
@acsr acsr moved this from in progress to Done in Alpine City Sprint 2025 Feb 13, 2025
@acsr acsr closed this as completed by moving to Done in Alpine City Sprint 2025 Feb 13, 2025
@petschki
Copy link
Member

husky was removed here Patternslib/dev#39 ... need to adopt the changes for mockup

@petschki petschki reopened this Feb 13, 2025
@petschki petschki moved this from Done to in progress in Alpine City Sprint 2025 Feb 13, 2025
@petschki
Copy link
Member

done in @patternslib/dev==3.7.1 and @plone/mockup==5.3.0

@github-project-automation github-project-automation bot moved this from in progress to Done in Alpine City Sprint 2025 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants