mapbox / mapbox/node-pre-gyp

Latest supported version of Node (prebuilt libraries) on the M1-chip

Open
#595 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

When I use
npm install node-pre-gyp
I get this warning

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.24.0/node-v83-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.24.0 and node@14.17.3 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)

and it starts to build, but I am then getting a lot of errors and warnings

the error building could be caused by this:


on-c-typedef-for-linkage]
typedef struct {
              ^
               grpc_credentials_mdelem_array
../deps/grpc/src/core/lib/security/credentials/credentials.h:218:21: note: type is not C-compatible due to this default member initializer
  grpc_mdelem* md = nullptr;
                    ^~~~~~~
../deps/grpc/src/core/lib/security/credentials/credentials.h:220:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
} grpc_credentials_mdelem_array;
  ^
16 warnings generated.
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.o
In file included from ../deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc:21:
In file included from ../deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.h:26:
In file included from ../deps/grpc/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h:26:
In file included from ../deps/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.h:29:
In file included from ../deps/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h:12:
In file included from ../deps/grpc/third_party/upb/upb/generated_util.h:10:
In file included from ../deps/grpc/third_party/upb/upb/msg.h:14:
../deps/grpc/third_party/upb/upb/upb.h:27:10: fatal error: 'upb/port_def.inc' file not found
#include "upb/port_def.inc"
         ^~~~~~~~~~~~~~~~~~

Is there a pre-built version for the M1-chip?

Using

npm -v
6.14.13
node -v
v14.17.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the npm install node-pre-gyp command with Node v14.17.3 on an M1 Mac and review the grpc@1.24.0 prebuilt-binary lookup and node-gyp fallback shown in the report. Check how prebuilt library artifacts are published and determine whether M1 support requires a new artifact or a supported-version update; done means installation no longer falls back to the failing source build.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.