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

Problem with node-gyp #181

Closed
robingood556 opened this issue Aug 17, 2023 · 1 comment · May be fixed by #182
Closed

Problem with node-gyp #181

robingood556 opened this issue Aug 17, 2023 · 1 comment · May be fixed by #182

Comments

@robingood556
Copy link

robingood556 commented Aug 17, 2023

Error: deasync@npm:0.1.22 STDOUT Usage Error: Couldn't find a script name "node-gyp" in the top-level (used by deasync@npm:0.1.22). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.

During installation step - "yarn install --immutable"
My previous step - "npm -i -g node-gyp" and also i have g++, make packages

@trusktr
Copy link

trusktr commented Oct 21, 2023

Related:

This is specifically an issue with Yarn, not with Npm, because Yarn prevents bins from being in PATH if they are not an explicit dependency of a package.

To solve this, Yarn recommends that deasync should have node-gyp as a dependency in package.json. Here's a pull request for that:

As a workaround, you can put this inside of .yarnrc.yml:

packageExtensions:
    # deasync didn't add node-gyp as a direct dependency so it fails to build in
    # Yarn (https://github.com/yarnpkg/berry/issues/5804), so extend its
    # pkg.json config here.
    deasync@*:
        dependencies:
            node-gyp: 'latest'

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

Successfully merging a pull request may close this issue.

2 participants