apache / apache/pulsar-client-node

Cannot build the nodejs client following the Readme

Offen
#237 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
164
Forks
98
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

System: Ubuntu-18.04

When I followed the readme to build the client, it threw following errors at the `npm run build` step:
```
make: Entering directory '/workspaces/pulsar-client-node/build'
SOLINK_MODULE(target) Release/obj.target/Pulsar.node
g++: error: ../pkg/lib/libpulsarwithdeps.a: No such file or directory
make: *** [Pulsar.target.mk:157: Release/obj.target/Pulsar.node] Error 1
make: Leaving directory '/workspaces/pulsar-client-node/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/nodejs/17.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.4.0-1090-azure
gyp ERR! command "/opt/nodejs/17.6.0/bin/node" "/opt/nodejs/17.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--module=/workspaces/pulsar-client-node/lib/binding/Pulsar.node" "--module_name=Pulsar" "--module_path=/workspaces/pulsar-client-node/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
gyp ERR! cwd /workspaces/pulsar-client-node
gyp ERR! node -v v17.6.0
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/opt/nodejs/17.6.0/bin/node /opt/nodejs/17.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --module=/workspaces/pulsar-client-node/lib/binding/Pulsar.node --module_name=Pulsar --module_path=/workspaces/pulsar-client-node/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
node-pre-gyp ERR! stack at ChildProcess. (/workspaces/pulsar-client-node/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Linux 5.4.0-1090-azure
node-pre-gyp ERR! command "/opt/nodejs/17.6.0/bin/node" "/workspaces/pulsar-client-node/node_modules/.bin/node-pre-gyp" "build"
node-pre-gyp ERR! cwd /workspaces/pulsar-client-node
node-pre-gyp ERR! node -v v17.6.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
node-pre-gyp ERR! not ok
```

Cannot find the `libpulsarwithdeps.a`. I found that there is a script to build the `libpulsarwithdeps.a` on the macos system but not for the linux system. I think we may need to update the Readme.

/cc @shibd

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit den README-Anweisungen für `npm run build` und vergleiche sie mit dem vorhandenen macOS-Skript, das `libpulsarwithdeps.a` erstellt. Prüfe, wie der Linux-Build diese Bibliothek erzeugen sollte, und dokumentiere anschließend die erforderlichen Schritte; abgeschlossen ist die Aufgabe, wenn der README-Workflow unter Ubuntu ohne den Fehler wegen der fehlenden Bibliothek erfolgreich durchläuft.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, linux, nodejs, ubuntu
Bereich
build-system, documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.