GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Known Issue] `npm i -g nativescript` error: gyp: binding.gyp not found · Issue #10509 · NativeScript/NativeScript

[Known Issue] npm i -g nativescript error: gyp: binding.gyp not found #10509

New issue
Copy link
New issue
Copy link
Closed
Closed
[Known Issue] npm i -g nativescript error: gyp: binding.gyp not found#10509
Copy link
Labels
known-issue

Description

@danny-su
danny-su
opened on Apr 9, 2024
Issue body actions

Issue Description

npm install --global nativescript

npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! code 1
npm ERR! path /opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.12.2 found at "/opt/homebrew/opt/[email protected]/bin/python3.12"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.12
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/danny/Library/Caches/node-gyp/21.7.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/danny/Library/Caches/node-gyp/21.7.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/danny/Library/Caches/node-gyp/21.7.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: binding.gyp not found (cwd: /opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents) while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp/lib/configure.js:297:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Darwin 23.4.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/21.7.2/bin/node" "/opt/homebrew/lib/node_modules/nativescript/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! gyp ERR! node -v v21.7.2
npm ERR! gyp ERR! node-gyp -v v10.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/danny/.npm/_logs/2024-04-09T05_55_44_073Z-debug-0.log

Reproduction

npm install --global nativescript

Relevant log output (if applicable)

No response

Environment

No response

Please accept these terms

  • I have searched the existing issues as well as StackOverflow and this has not been posted before
  • This is a bug report
  • I agree to follow this project's Code of Conduct
Reacted by Christian Rishøj and Jason

Activity

  1. danny-su
    added
    bug-pending-triageReported bug, pending triage to confirm.Reported bug, pending triage to confirm.
    on Apr 9, 2024
  2. rigor789
    added
    known-issue
    and removed
    bug-pending-triageReported bug, pending triage to confirm.Reported bug, pending triage to confirm.
    on Apr 9, 2024
  3. rigor789 commented on Apr 9, 2024

    @rigor789
    rigor789
    on Apr 9, 2024
    Member
    More actions

    This is an issue introduced in NPM 10.4.0 - I have reported it here: npm/cli#7355

    As a workaround:

    npm i -g npm@~10.3
    npm i -g nativescript
    Reacted by Danny Su, GOVINDA ALWANI, Sébastien JEAN, iliiliili, Renan Degrandi, Aza Noriega, Centulus, Mitchell, Roman Drahan, German Rosario and 2 more
    Reacted by Bagaskara Wisnu Gunawan
  4. rigor789
    changed the title [-]gyp: binding.gyp not found[/-] [+][Known Issue] `npm i -g nativescript` error: gyp: binding.gyp not found[/+] on Apr 9, 2024
  5. rigor789
    pinned this issue on Apr 9, 2024
  6. NathanWalker commented on May 6, 2024

    @NathanWalker
    NathanWalker
    on May 6, 2024
    Contributor
    More actions

    Another issue you may see similar to this can look like this:

    npm ERR! code 1
    npm ERR! path /Users/me/Documents/project/node_modules/better-sqlite3
    npm ERR! command failed
    npm ERR! command sh -c prebuild-install || node-gyp rebuild --release
    npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.11.0 runtime=node arch=arm64 libc= platform=darwin)
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using [email protected]
    npm ERR! gyp info using [email protected] | darwin | arm64
    npm ERR! gyp info find Python using Python version 3.12.3 found at "/opt/homebrew/opt/[email protected]/bin/python3.12"
    npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.12
    
    ... more omitted for brevity ...
    
    npm ERR! Traceback (most recent call last):
    npm ERR!   File "/Users/me/Documents/project/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
    npm ERR!     import gyp  # noqa: E402
    npm ERR!     ^^^^^^^^^^
    npm ERR!   File "/Users/me/Documents/project/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
    npm ERR!     import gyp.input
    npm ERR!   File "/Users/me/Documents/project/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
    npm ERR!     from distutils.version import StrictVersion
    npm ERR! ModuleNotFoundError: No module named 'distutils'

    You can set this in your ~/.zshrc to resolve:

    export npm_config_python=/opt/homebrew/bin/python3.11

    Just be sure to open new terminal tab, or source ~/.zshrc after adding.

    Reacted by Rolle Laukkarinen
  7. rigor789
    closed this as completedin b0a926bon May 16, 2024
  8. rigor789
    reopened this on May 16, 2024
  9. jono-hayward commented on May 26, 2024

    @jono-hayward
    jono-hayward
    on May 26, 2024
    More actions

    This is an issue introduced in NPM 10.4.0 - I have reported it here: npm/cli#7355

    As a workaround:

    npm i -g npm@~10.3
    npm i -g nativescript

    Could this workaround maybe be added to the setup documentation? Would have saved me a couple of days of googling and reinstalling things 😂

    Reacted by Bagaskara Wisnu Gunawan
  10. NathanWalker
    added a commit that references this issue on May 28, 2024

    chore: speculatively bundle fsevents to fix NativeScript/NativeScript…

    b0a926b
  11. NathanWalker commented on May 28, 2024

    @NathanWalker
    NathanWalker
    on May 28, 2024
    Contributor
    More actions

    @jono-hayward it appears fixed on cli next with npm 10.8.

    For example, this is what we see when installing next - if you get a chance to confirm from your end would be great.

    % npm -v
    10.8.0
    
    % npm i -g nativescript@next
    npm warn deprecated [email protected]: This package is no longer supported.
    npm warn deprecated [email protected]: This package is no longer supported. Please use @npmcli/package-json instead.
    npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
    npm warn deprecated [email protected]: This package is no longer supported.
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: This package is no longer supported.
    npm warn deprecated [email protected]: This package is no longer supported.
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: This package is no longer supported.
    
    removed 1 package, and changed 849 packages in 25s
    
    76 packages are looking for funding
      run `npm fund` for details
    % ns -v
    8.7.1-next-05-20-2024-9165247539
    

    You can npm i -g npm and then just npm i -g nativescript@next - if that's clear for you we'll include in a patch.

  12. rigor789 commented on May 28, 2024

    @rigor789
    rigor789
    on May 28, 2024
    Member
    More actions

    Fixed in https://github.com/NativeScript/nativescript-cli/releases/tag/v8.7.2

  13. rigor789
    closed this as completedon May 28, 2024
  14. NathanWalker
    unpinned this issue on Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    known-issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.