Search code examples
node.jsnosqliotin-memory-databasegriddb

GridDB Node.js client will not build


We've decided to switch to using Node.js, and I'm trying to build out the GridDB Node.js client, but I'm getting a make error. I followed closely with the blog and the GitHub instructions. How can I fix this?

Here's the error code:

$ make
g++ -fPIC -std=c++0x -g -O2 -c -o src/TimeSeriesProperties.o -Iinclude -Isrc src/TimeSeriesProperties.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/ContainerInfo.o -Iinclude -Isrc src/ContainerInfo.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/AggregationResult.o -Iinclude -Isrc src/AggregationResult.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Container.o -Iinclude -Isrc src/Container.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Store.o -Iinclude -Isrc src/Store.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/StoreFactory.o -Iinclude -Isrc src/StoreFactory.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/PartitionController.o -Iinclude -Isrc src/PartitionController.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Query.o -Iinclude -Isrc src/Query.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/QueryAnalysisEntry.o -Iinclude -Isrc src/QueryAnalysisEntry.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/RowKeyPredicate.o -Iinclude -Isrc src/RowKeyPredicate.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/RowSet.o -Iinclude -Isrc src/RowSet.cpp
swig -DSWIGWORDSIZE64 -Ilibs/js/v8 -outdir . -o src/griddb_js.cxx -c++ -javascript -node src/griddb.i
g++ -fPIC -std=c++0x -g -O2 -Iinclude -Isrc -I/usr/include/node -DNODE_GYP_MODULE_NAME=griddb -DV8_DEPRECATION_WARNINGS=1 -DBUILDING_NODE_EXTENSION -c -o src/griddb_js.o src/griddb_js.cxx
src/griddb_js.cxx:171:18: fatal error: node.h: No such file or directory
 #include <node.h>
                  ^
compilation terminated.
make: *** [src/griddb_js.o] Error 1

Solution

  • src/griddb_js.cxx:171:18: fatal error: node.h: No such file or directory
     #include <node.h>
    

    The compiler can't find the "node.h" header file in any of the include paths ("/usr/include/node").

    You need to install a "nodejs-devel" package that includes this header then re-run make.