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

Yarn fails to build npm package prepush-hook on windows #1239

Closed
H34D opened this issue Oct 19, 2016 · 3 comments
Closed

Yarn fails to build npm package prepush-hook on windows #1239

H34D opened this issue Oct 19, 2016 · 3 comments

Comments

@H34D
Copy link

H34D commented Oct 19, 2016

Using Yarn 1.16.0

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Fails on building the package, npm does not fail

If the current behavior is a bug, please provide the steps to reproduce.
yarn install prepush-hook or yarn install with prepush-hook in package.json

[4/4] Building fresh packages...
[1/7] ⠂ fsevents
[2/7] ⠂ buffertools
[3/7] ⠂ node-sass
[4/7] ⠂ prepush-hook
error ......\node_modules\prepush-hook: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c hook_install
Directory: .....\node_modules\prepush-hook
Output:
The command "hook_install" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

it looks like yarn is unable to find the binary file. Inside the package.json of prepush-hook are the following configurations:

"bin": {
"hook_install": "./bin/install",
"hook_uninstall": "./bin/uninstall",
"pre-push": "./bin/pre-push"
},
"scripts": {
"install": "hook_install",
"uninstall": "hook_uninstall"
},

i think this is sort of uncommon.

What is the expected behavior?
Yarn should build the package, like npm does

Please mention your node.js, yarn and operating system version.
node 6, yarn 1.16, windows 10 x64

@rgoldfinger
Copy link

rgoldfinger commented Oct 21, 2016

Seeing the same issue with the git-hooks package on macOS Sierra:

> yarn add git-hooks                                                                                                                                                 rg-leave ✭ ✱ ◼
yarn add v0.16.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
[1/1] ⠄ git-hooks
[-/1] ⠄ waiting...
[-/1] ⠄ waiting...
[-/1] ⠄ waiting...
error /Users/rgoldfinger/remind/r101-react-native/node_modules/git-hooks: Command failed.
Exit code: 127
Command: sh
Arguments: -c git-hooks --install
Directory: /Users/rgoldfinger/remind/r101-react-native/node_modules/git-hooks
Output:
sh: git-hooks: command not found
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

I wonder if #1210 will fix it?

@sebmck
Copy link
Contributor

sebmck commented Nov 3, 2016

Fixed via #1210.

@sebmck sebmck closed this as completed Nov 3, 2016
@H34D
Copy link
Author

H34D commented Nov 19, 2016

just tried v0.17.6 and the Problem still exists

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

3 participants