Skip to content

NPX-based installs instead of NPM #34

@TomLucidor

Description

@TomLucidor

NPM install methods managed to cause a lot of weird errors, please provide a different option outside of using Docker or direct Git builds

npm error code 1
npm error path /opt/homebrew/lib/node_modules/lynkr/node_modules/tree-sitter
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild
npm error CC(target) Release/obj.target/tree_sitter/vendor/tree-sitter/lib/src/lib.o
npm error   LIBTOOL-STATIC Release/tree_sitter.a
npm error   CXX(target) Release/obj.target/tree_sitter_runtime_binding/src/binding.o
npm error prebuild-install warn install No prebuilt binaries found (target=25.2.1 runtime=node arch=arm64 libc= platform=darwin)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@12.1.0
npm error gyp info using node@25.2.1 | darwin | arm64
npm error gyp info find Python using Python version 3.14.2 found at "/opt/homebrew/opt/python@3.14/bin/python3.14"
npm error gyp info spawn /opt/homebrew/opt/python@3.14/bin/python3.14
npm error gyp info spawn args [
npm error gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/opt/homebrew/lib/node_modules/lynkr/node_modules/tree-sitter/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/user/Library/Caches/node-gyp/25.2.1/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/Users/user/Library/Caches/node-gyp/25.2.1',
npm error gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/user/Library/Caches/node-gyp/25.2.1/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/lib/node_modules/lynkr/node_modules/tree-sitter',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from ../src/binding.cc:1:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/node.h:74:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8.h:23:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/cppgc/common.h:8:
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8config.h:13:2: error: "C++20 or later required."
npm error    13 | #error "C++20 or later required."
npm error       |  ^
npm error In file included from ../src/binding.cc:1:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/node.h:74:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8.h:24:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-array-buffer.h:12:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:13:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-handle-base.h:8:
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-internal.h:1356:37: error: a non-type template parameter cannot have type 'ExternalPointerTagRange' (aka 'TagRange<ExternalPointerTag>') before C++20
npm error  1356 |   template <ExternalPointerTagRange tag_range>
npm error       |                                     ^
npm error In file included from ../src/binding.cc:1:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/node.h:74:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8.h:24:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-array-buffer.h:12:
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:379:5: error: unknown type name 'requires'
npm error   379 |     requires std::is_base_of_v<T, S>
npm error       |     ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:379:19: error: non-friend class member 'is_base_of_v' cannot have a qualified name
npm error   379 |     requires std::is_base_of_v<T, S>
npm error       |              ~~~~~^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:379:19: error: member 'is_base_of_v' declared as a template
npm error   378 |   template <class S>
npm error       |   ~~~~~~~~~~~~~~~~~~
npm error   379 |     requires std::is_base_of_v<T, S>
npm error       |                   ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:379:19: error: variable template partial specialization of 'is_base_of_v' not in a namespace enclosing '__1'
npm error /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_base_of.h:27:50: note: explicitly specialized declaration is here
npm error    27 | _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
npm error       |                                                  ^
npm error In file included from ../src/binding.cc:1:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/node.h:74:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8.h:24:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-array-buffer.h:12:
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:379:37: error: expected ';' at end of declaration list
npm error   379 |     requires std::is_base_of_v<T, S>
npm error       |                                     ^
npm error       |                                     ;
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:744:5: error: unknown type name 'requires'
npm error   744 |     requires std::is_base_of_v<T, S>
npm error       |     ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:744:19: error: non-friend class member 'is_base_of_v' cannot have a qualified name
npm error   744 |     requires std::is_base_of_v<T, S>
npm error       |              ~~~~~^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:744:19: error: member 'is_base_of_v' declared as a template
npm error   743 |   template <class S>
npm error       |   ~~~~~~~~~~~~~~~~~~
npm error   744 |     requires std::is_base_of_v<T, S>
npm error       |                   ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:744:19: error: variable template partial specialization of 'is_base_of_v' not in a namespace enclosing '__1'
npm error /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_base_of.h:27:50: note: explicitly specialized declaration is here
npm error    27 | _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
npm error       |                                                  ^
npm error In file included from ../src/binding.cc:1:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/node.h:74:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8.h:24:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-array-buffer.h:12:
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-local-handle.h:744:37: error: expected ';' at end of declaration list
npm error   744 |     requires std::is_base_of_v<T, S>
npm error       |                                     ^
npm error       |                                     ;
npm error In file included from ../src/binding.cc:1:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/node.h:74:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8.h:24:
npm error In file included from /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-array-buffer.h:13:
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:45:28: error: no member named 'ranges' in namespace 'std'
npm error    45 | inline constexpr bool std::ranges::enable_view<v8::MemorySpan<T>> = true;
npm error       |                       ~~~~~^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:47:28: error: no member named 'ranges' in namespace 'std'
npm error    47 | inline constexpr bool std::ranges::enable_borrowed_range<v8::MemorySpan<T>> =
npm error       |                       ~~~~~^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:93:14: error: expected parameter declarator
npm error    93 |     requires(!std::is_function_v<U>)
npm error       |              ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:93:14: error: expected ')'
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:93:13: note: to match this '('
npm error    93 |     requires(!std::is_function_v<U>)
npm error       |             ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:93:5: error: a type specifier is required for all declarations
npm error    93 |     requires(!std::is_function_v<U>)
npm error       |     ^
npm error /Users/user/Library/Caches/node-gyp/25.2.1/include/node/v8-memory-span.h:94:5: error: 'nodiscard' attribute cannot be applied to types
npm error    94 |   [[nodiscard]] static constexpr U* to_address(U* p) noexcept {
npm error       |    

Reference to "Option 1" https://github.com/Fast-Editor/Lynkr?tab=readme-ov-file#quick-start

Metadata

Metadata

Assignees

No one assigned

    Labels

    Solution proposedSolution Proposed for the issuebugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions