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

Husky dependency causes issues when building app #472

Closed
dakotabuck opened this issue Apr 11, 2021 · 1 comment
Closed

Husky dependency causes issues when building app #472

dakotabuck opened this issue Apr 11, 2021 · 1 comment

Comments

@dakotabuck
Copy link

Hi, I encountered a build issue. It seems to be a problem with Husky. I tested this on both Linux and Windows.

Steps to reproduce:

  • Begin new React project
  • Install react-photoswipe gallery npm install photoswipe react-photoswipe-gallery --save
  • Run project via any means e.g. npm run dev or npm run build

Expected Behavior: build succeeds, application server runs with react-photoswipe-gallery

Observed Behavior: build fails with the following error:

   -----> Installing dependencies

   Installing node modules

   

   > [email protected] postinstall /tmp/build_0f71b228/node_modules/core-js

   > node -e "try{require('./postinstall')}catch(e){}"

   

   

   > [email protected] postinstall /tmp/build_0f71b228/node_modules/react-photoswipe-gallery

   > husky install

   

   sh: 1: husky: not found

   npm ERR! code ELIFECYCLE

   npm ERR! syscall spawn

   npm ERR! file sh

   npm ERR! errno ENOENT

   npm ERR! [email protected] postinstall: `husky install`

   npm ERR! spawn ENOENT

   npm ERR! 

   npm ERR! Failed at the [email protected] postinstall script.

   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Notes: I was able to work around this temporarily by editing the index.js file this error references to continue execution without existence of .git folder, but I don't know if this is a problem with react-photoswipe-gallery or with its dependency husky.

@irudoy irudoy closed this as completed in 4bf7f0b Apr 12, 2021
@irudoy
Copy link
Contributor

irudoy commented Apr 12, 2021

@dakotabuck thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants