Following directions on the README.md...
node -v
v0.10.38
npm -v
2.9.0
From within NodeGoat dir I receive errors:
npm install
[email protected] install
NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
(node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build' CXX(target) Release/obj.target/kerberos/lib/kerberos.o make: Leaving directory
NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build'
npm WARN installMany nopt was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany npmlog was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany request was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany semver was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany tar was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany tar-pack was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany mkdirp was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany rc was bundled with [email protected], but bundled package wasn't found in unpacked tree
npm WARN installMany rimraf was bundled with [email protected], but bundled package wasn't found in unpacked tree
[email protected] install NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext
(node-pre-gyp install --fallback-to-build) || (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build' CXX(target) Release/obj.target/bson/ext/bson.o make: g++: Command not found make: *** [Release/obj.target/bson/ext/bson.o] Error 127 make: Leaving directory
NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build/Release/bson.node" "--module_name=bson" "--module_path=NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build/Release"
gyp ERR! cwd NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext
gyp ERR! node -v v0.10.38
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build/Release/bson.node --module_name=bson --module_path=NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build/Release' (1)
node-pre-gyp ERR! stack at ChildProcess. (NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:766:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
node-pre-gyp ERR! System Linux 3.13.0-24-generic
node-pre-gyp ERR! command "node" "NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext
node-pre-gyp ERR! node -v v0.10.38
node-pre-gyp ERR! node-pre-gyp -v v0.6.4
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build/Release/bson.node --module_name=bson --module_path=Source/NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build/Release' (1)
make: Entering directory NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build' CXX(target) Release/obj.target/bson/ext/bson.o make: Leaving directory
NodeGoat/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/build'
[email protected] node_modules/dont-sniff-mimetype
Then with:
grunt db-reset:development:
Running "db-reset:development" (db-reset) task
db-reset:
Error: Command failed: js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
NodeGoat/node_modules/mongodb/lib/server.js:228
process.nextTick(function() { throw err; })
^
TypeError: Cannot call method 'dropCollection' of null
at NodeGoat/artifacts/db-reset.js:68:8
at NodeGoat/node_modules/mongodb/lib/mongo_client.js:236:20
at NodeGoat/node_modules/mongodb/lib/db.js:203:14
at null. (NodeGoat/node_modules/mongodb/lib/server.js:226:9)
at g (events.js:180:16)
at emit (events.js:98:17)
at null. (NodeGoat/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:255:68)
at g (events.js:180:16)
at emit (events.js:98:17)
at null. (NodeGoat/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:77:12)
js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
NodeGoat/node_modules/mongodb/lib/server.js:228
process.nextTick(function() { throw err; })
^
TypeError: Cannot call method 'dropCollection' of null
at NodeGoat/artifacts/db-reset.js:68:8
at NodeGoat/node_modules/mongodb/lib/mongo_client.js:236:20
at NodeGoat/node_modules/mongodb/lib/db.js:203:14
at null. (NodeGoat/node_modules/mongodb/lib/server.js:226:9)
at g (events.js:180:16)
at emit (events.js:98:17)
at null. (NodeGoat/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:255:68)
at g (events.js:180:16)
at emit (events.js:98:17)
at null. (NodeGoat/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:77:12)
Done, without errors.
npm start
[email protected] start NodeGoat
node server.js
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
Error: DB: connect
{ [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "start"
npm ERR! node v0.10.38
npm ERR! npm v2.9.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server.js'.
npm ERR! This is most likely a problem with the owasp-nodejs-goat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls owasp-nodejs-goat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! NodeGoat/npm-debug.log
There is no npm-debug.log
Any ideas?
I'm running a demo of this the day after tomorrow and will be in-flight tomorrow.
Thanks.