Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Bundling Node.js chaincode for offline install

Offen
#321 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, node.js
Bereich
blockchain

Rechercherichtung

Beginne mit dem Packaging-Flow des Issues: npm install, dem Peer-Lifecycle-Paket und dem im Beschreibungstext referenzierten fabric-chaincode-node start-Bootstrap. Vergleiche die beiden vorgeschlagenen Ansätze – die manuelle Erstellung eines Tarballs und das Bundling mit esbuild – und prüfe die Diskussion in #197. Als erledigt gilt die Identifizierung und Dokumentation eines einfachen unterstützten Offline-Installationspfads für Node.js-Chaincode.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Node.js chaincode build containers require access to the npm registry when installing chaincode.
This becomes an issue for peers that are "offline" (e.g. peers from cloud providers) and do not have access to the npm registry. Simply running "npm install" before packaging chaincode with "peer lifecycle package" does not solve the problem alone, since the package command ignores the node_modules directory.

We have identified two possible ways to solve this:

  • Creating the tarball package manually without using "peer lifecycle package".
  • Bundling the application (e.g. with esbuild) before packaging it with "peer lifecycle package".

While the first option works fine, it does make the process of deploying Node.js chaincode a lot more complex than deploying Go or Java chaincode. We would therefore prefer the second option, however, we are still required to add fabric-shim as a module outside the bundle, so that "fabric-chaincode-node start" is available when bootstrapping the chaincode.

Would it be possible to start the application without requiring "fabric-chaincode-node start" as an external script, e.g. by calling the bootstrap function in the chaincode's index.js instead?
Are there any other simple ways to solve this that I've missed or is manually creating the tarball the suggested approach for now?

This issue was also discussed in #197 but seems unresolved

Vorherrschende Sprache
JavaScript
Sterne
262
Forks
147
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus hyperledger/fabric-chaincode-node

Alle Issues in hyperledger/fabric-chaincode-node

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

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