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

On failure yarn gives no output but npm does #16

Open
culli opened this issue Jul 15, 2022 · 3 comments
Open

On failure yarn gives no output but npm does #16

culli opened this issue Jul 15, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@culli
Copy link

culli commented Jul 15, 2022

Expected Behavior

When the install fails on yarn it should return the output of the error.

Actual Behavior

In yarn the build does not show the error:

error ..../node_modules/saucectl: Command failed.
Output:

With npm it will give more info:

Installation failed: 
Check that you have access to https://github.com/saucelabs/saucectl/releases or format of the 
SAUCECTL_INSTALL_BINARY environment variable is correct

Steps to Reproduce the Problem

  1. In my case, the error is happening because I'm on an M1 Mac and saucectl dependencies don't detect it correctly.
  2. Add saucectl as a dependency in package.json.
  3. Run yarn

Specifications

  • Version:
    • saucectl, tried with both 0.87.0 and 0.102.0
    • yarn 1.22.19
    • node 16.14.2
  • Platform: Apple M1 processor, MacBook Pro, macOS 12.14 (monterey)
  • Subsystem:
@culli
Copy link
Author

culli commented Jul 15, 2022

@alexplischke alexplischke added the enhancement New feature or request label Jul 15, 2022
@alexplischke
Copy link
Contributor

Hm. Wasn't able to reproduce this behavior (Apple M1 user here) 🤔

Here's me trying to get a version that doesn't exist:

❯ SAUCECTL_INSTALL_BINARY=https://github.com/saucelabs/saucectl/releases/download/v0.105.0/saucectl_0.105.0_mac_arm64.tar.gz yarn add saucectl
yarn add v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /Users/alexplischke/devel/saucectl-cypress-example/node_modules/saucectl: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/alexplischke/devel/saucectl-cypress-example/node_modules/saucectl
Output:
Fetching saucectl binary
Installation failed: HTTPError: Response code 404 (Not Found)
Check that you have access to https://github.com/saucelabs/saucectl/releases or format of the SAUCECTL_INSTALL_BINARY environment variable is correct

Another attempt from a host that doesn't exist:

❯ SAUCECTL_INSTALL_BINARY=https://localhost/nope.tar.gz yarn add saucectl
yarn add v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /Users/alexplischke/devel/saucectl-cypress-example/node_modules/saucectl: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/alexplischke/devel/saucectl-cypress-example/node_modules/saucectl
Output:
Fetching saucectl binary
Installation failed: RequestError: connect ECONNREFUSED 127.0.0.1:443
Check that you have access to https://github.com/saucelabs/saucectl/releases or format of the SAUCECTL_INSTALL_BINARY environment variable is correct
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

In both cases, yarn reported a failure correctly reported to me.

And if I let it run its default course (without overriding the binary):

❯ yarn add saucectl
yarn add v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
✨  Done in 2.42s.

The above will install an x64 arch binary, rather than a native arm64 one, which is a different issue, but the install does succeed.

@vik7607
Copy link

vik7607 commented Apr 17, 2023

I am also facing the same error when I am trying to install saucectl using npm from window environment , can you please suggest any workaround to install this package in window

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

No branches or pull requests

3 participants