I’ve been at this for days and I can’t seem to fix this. It runs well on my local system (that has python 2.7) but does not run well on the server (that has python 2.6). I’m not sure if python version is the issue though. I had an older version of node before and it was working well on the server.
When I try to install couchbase (npm install couchbase), I get this error :
> iconv@2.3.0 install /***/projectname/node_modules/iconv
> node-gyp rebuild
make: Entering directory `/***/projectname/node_modules/iconv/build'
CXX(target) Release/obj.target/iconv/src/binding.o
cc1plus: error: unrecognized command line option "-std=gnu++1y"
make: *** [Release/obj.target/iconv/src/binding.o] Error 1
make: Leaving directory `/***/projectname/node_modules/iconv/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 2.6.32-573.8.1.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /***/projectname/node_modules/iconv
gyp ERR! node -v v10.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN projectname@1.0.0 No description
npm WARN projectname@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iconv@2.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iconv@2.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I’m unable to install node-gyp aswell. Tried various SO solutions but end up with this same problem. When I try to run my node project, I get this :
Error: Could not locate the bindings file. Tried:
→ /***/projectname/node_modules/couchbase/build/couchbase_impl.node
→ /***/projectname/node_modules/couchbase/build/Debug/couchbase_impl.node
→ /***/projectname/node_modules/couchbase/build/Release/couchbase_impl.node
→ /***/projectname/node_modules/couchbase/out/Debug/couchbase_impl.node
→ /***/projectname/node_modules/couchbase/Debug/couchbase_impl.node
→ /***/projectname/node_modules/couchbase/out/Release/couchbase_impl.node
→/***/projectname/node_modules/couchbase/Release/couchbase_impl.node
→/***/projectname/node_modules/couchbase/build/default/couchbase_impl.node
→ /***/projectname/node_modules/couchbase/compiled/10.6.0/linux/x64/couchbase_impl.node
at bindings (/***/projectname/node_modules/bindings/bindings.js:93:9)
at Object.<anonymous> (/***/projectname/node_modules/couchbase/lib/binding.js:203:36)
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)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/***/projectname/node_modules/couchbase/lib/couchbase.js:3:15)
I don’t have an option to upgrade to 2.7 on the server. Any help would be greatly appreciated.
Thanks