Skip to content

Cannot find module './build/Debug/nodegit' #137

Closed
hobo05/nginx-graph
#2

Description

@temp3l

...Solved (but please update Docs - this took me quite some time!)
The Wiki Page reads:

git clone git://github.com/tbranyen/nodegit.git
$ cd nodegit
$ npm run-script gen && npm install

this fails, complaining about missing ejs (on all machines/distris)

so I run:

npm i ejs &&  npm run-script gen && npm install

Compile succeeds!!!, BUT:

npm test

always gave me:
Cannot find module './build/Debug/nodegit'

I had cmake 2.8 installed (centos here)
but cmake --version told me 2.6 was in use.

Solved by:

ln -s /usr/bin/cmake28 /usr/bin/cmake

Activity

  1. tbranyen commented on Mar 23, 2014

    @tbranyen
    Member

    I've been able to compile just fine with the instructions in the README. Please update the Wiki or the README via a pull request.

  2. airtonix commented on Mar 23, 2015

    @airtonix

    I get this error from simply using npm install --save nodegit.

    I fully expect to be able to just use this after using npm install

  3. tbranyen commented on Mar 23, 2015

    @tbranyen
    Member

    @airtonix this is a native node module, meaning it's more than just JavaScript, fix those expectations as we cannot guarantee this module will install "simply" on every single platform and every single version of Node.

  4. sokraflex commented on Mar 28, 2015

    @sokraflex

    I've got the same issues:
    npm install nodegit
    node index.js

    ...where index.js has the following content:

    var nodegit = require('nodegit');
    

    Running on Debian 7 64-Bit (Linux 3.2.41-2)
    /edit: same experience under Ubuntu 14.04 LTS 64-Bit (Linux 3.2.0-23-generic)

    Result:

    Cannot find module '../build/Debug/nodegit'
        at Function.Module._resolveFilename (module.js:338:15)
        at Function.Module._load (module.js:280:25)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/var/www/node_modules/nodegit/lib/nodegit.js:12:12)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
    

    The solution from stephanMettler doesn't work with me as it seems installing cmake (which was not installed during first nodegit-installation and does not seem to be required anymore) does not have any influence on this error.

  5. airtonix commented on Mar 29, 2015

    @airtonix

    @tbranyen Then this project is fairly pointless if it doesn't work across mutliple platforms... I may as well just run the git binary through a shell process.

  6. tbranyen commented on Mar 29, 2015

    @tbranyen
    Member

    We support a hefty prebuilt matrix that includes all common operating systems and environments that the team is using. If you have a compiler on your machine you can compile the project from source.

    Since, as I previously stated, we cannot guarantee working prebuilts for every single platform and architecture, I'm going to lock this issue from more noise.

    You can find instructions on building from source here: http://www.nodegit.org/guides/install/from-source/

  7. locked and limited conversation to collaborators on Mar 29, 2015
  8. maxkorp commented on Mar 30, 2015

    @maxkorp
    Collaborator

    I'll just clarify a bit here. Code is being added (or may have already been added, I think) by @tbranyen to change this output since it's very misleading, but this is the issue:

    For some reason, The release build of the module is failing to load. We would try catch around loads, so if you built for debug instead, it would fail to load the release version, and in the catch load the debug version. Some other issue is causing release to not load, so it catches and tries to load debug, and fails (naturally, since it built for release). The new system only falls back to debug if the release module was not found (flat out doesnt exist, not some other error), otherwise it will output the meaningful error.

    @airtonix you might find that you'll get better support (be it in help with an error, or expanding our prebuilt matrices) if you A) give us any meaningful info to go off of (See here #521, or @SargTeX's response) and B) stop acting like you idolize Torvalds' social output.

    @SargTeX, see my comments in #521 re: gcc, and either get back to me there, or hop into our gitter room and we'll get you all sorted 👍

  9. added a commit that references this issue on Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions