mapbox / mapbox/cmake-node-module

Running the example fails

Offen
#1 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
CMake
Sterne
20
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I've got the following trace :

$ ./run.sh
> simple@1.0.0 install /tmp/cmake-node-module/test/simple
> cmake-node-module

-- The CXX compiler identification is GNU 8.2.1
-- The C compiler identification is GNU 8.2.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at node_modules/@mapbox/cmake-node-module/module.cmake:64 (message):
  [Node.js] Unused arguments: 'INSTALL_DIR;lib'
Call Stack (most recent call first):
  CMakeLists.txt:8 (add_node_module)


-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cmake-node-module/test/simple/build
Scanning dependencies of target simple.abi-64
[ 50%] Building CXX object CMakeFiles/simple.abi-64.dir/simple.cpp.o
[100%] Linking CXX shared library simple.abi-64.node
[100%] Built target simple.abi-64
npm WARN simple@1.0.0 No description
npm WARN simple@1.0.0 No repository field.
npm WARN simple@1.0.0 No license field.

audited 1 package in 2.257s
found 0 vulnerabilities

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module './simple.abi-64'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/tmp/cmake-node-module/test/simple/simple.js:1:80)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
[1]    4465 exit 1     ./run.sh

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Führe ./run.sh in test/simple aus und untersuche den Fehler aus test/simple/simple.js. Lies CMakeLists.txt am add_node_module-Aufruf und node_modules/@mapbox/cmake-node-module/module.cmake um Zeile 64 herum und vergleiche anschließend die erstellte .node-Datei mit dem Pfad, der angefordert wird. Erledigt ist die Aufgabe, wenn das Beispiel ohne den module-not-found-Fehler erfolgreich ausgeführt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cmake, cpp, javascript, node.js
Bereich
build-system, devtools
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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