node-gdal
node-gdal copied to clipboard
Failed to build with node
module.js:472
throw err;
^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at [eval]:1:1
at ContextifyScript.Script.runInThisContext (vm.js:23:33)
at Object.exports.runInThisContext (vm.js:74:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:571:32)
at Immediate.<anonymous> (bootstrap_node.js:383:29)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/strk/.nvm/versions/node/v7.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:308:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:192:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-59-generic
gyp ERR! command "/home/strk/.nvm/versions/node/v7.5.0/bin/node" "/home/strk/.nvm/versions/node/v7.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--enable-logging=true" "--module=/usr/src/node/modules/gdal/node-gdal/lib/binding/node-v51-linux-x64/gdal.node" "--module_name=gdal" "--module_path=/usr/src/node/modules/gdal/node-gdal/lib/binding/node-v51-linux-x64"
gyp ERR! cwd /usr/src/node/modules/gdal/node-gdal
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Node v7.5.0, v6.9.5, v4.2.6 and v0.10.48 all fail with the same error (upon running make
)
This is as of 5c894cc6fda3f2c08fbe95fe2efc5e03d9bf6e46
If I run make
on fresh clone I get the error you mention. But if I run an npm install
before running make
it builds as expected.
The Makefile is mainly around for development right now. I suppose I could fix it up so it doesn't rely on an npm install
beforehand, if it's helpful. What's your use case?
I just assumed make
would do get me to a ready-to-use thing
(ie: call npm install
)