mozilla / openbadges-badgekit

No Longer Maintained
https://badgekit.org
Mozilla Public License 2.0
123 stars 84 forks source link

BadgeKit install failed #479

Closed dbair closed 9 years ago

dbair commented 9 years ago

I am trying to perform a self hosting install on Debian Linux 7. I am successful installing and starting BadgeKit-Api. When I run npm install in the openbadges-badgekit folder I receive several errors. I do not see how to add the npm-debug.log file to this post. Some of the error messages are: ../src/node-proxy.cc:1490:5: error: ‘New’ is not a member of ‘v8::String’ ../src/node-proxy.cc:1492:39: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’ ../src/node-proxy.cc:1497:34: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’ ../src/node-proxy.cc:1499:55: error: no matching function for call to ‘v8::Object::Set(v8::Persistentv8::String&, v8::Localv8::Function&, v8::PropertyAttribute)’ ../src/node-proxy.cc:1519:43: error: invalid conversion from ‘v8::Handlev8::Value ()(v8::Localv8::String, const int&)’ to ‘v8::NamedPropertyGetterCallback {aka void ()(v8::Localv8::String, const v8::PropertyCallbackInfov8::Value&)}’ [-fpermissive] In file included from ../src/./node-proxy.h:37:0, from ../src/node-proxy.cc:33: /root/.node-gyp/0.12.2/deps/v8/include/v8.h:3605:8: error: initializing argument 1 of ‘void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetterCallback, v8::NamedPropertySetterCallback, v8::NamedPropertyQueryCallback, v8::NamedPropertyDeleterCallback, v8::NamedPropertyEnumeratorCallback, v8::Handlev8::Value)’ [-fpermissive] ../src/node-proxy.cc:1519:43: error: invalid conversion from ‘v8::Handlev8::Value ()(v8::Localv8::String, v8::Localv8::Value, const int&)’ to ‘v8::NamedPropertySetterCallback {aka void ()(v8::Localv8::String, v8::Localv8::Value, const v8::PropertyCallbackInfov8::Value&)}’ [-fpermissive] In file included from ../src/./node-proxy.h:37:0, from ../src/node-proxy.cc:33: /root/.node-gyp/0.12.2/deps/v8/include/v8.h:3605:8: error: initializing argument 2 of ‘void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetterCallback, v8::NamedPropertySetterCallback, v8::NamedPropertyQueryCallback, v8::NamedPropertyDeleterCallback, v8::NamedPropertyEnumeratorCallback, v8::Handlev8::Value)’ [-fpermissive] ../src/node-proxy.cc:1519:43: error: invalid conversion from ‘v8::Handlev8::Integer ()(v8::Localv8::String, const int&)’ to ‘v8::NamedPropertyQueryCallback {aka void ()(v8::Localv8::String, const v8::PropertyCallbackInfov8::Integer&)}’ [-fpermissive] In file included from ../src/./node-proxy.h:37:0, from ../src/node-proxy.cc:33: /root/.node-gyp/0.12.2/deps/v8/include/v8.h:3605:8: error: initializing argument 3 of ‘void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetterCallback, v8::NamedPropertySetterCallback, v8::NamedPropertyQueryCallback, v8::NamedPropertyDeleterCallback, v8::NamedPropertyEnumeratorCallback, v8::Handlev8::Value)’ [-fpermissive] ../src/node-proxy.cc:1519:43: error: invalid conversion from ‘v8::Handlev8::Boolean ()(v8::Localv8::String, const int&)’ to ‘v8::NamedPropertyDeleterCallback {aka void ()(v8::Localv8::String, const v8::PropertyCallbackInfov8::Boolean&)}’ [-fpermissive] In file included from ../src/./node-proxy.h:37:0, from ../src/node-proxy.cc:33: /root/.node-gyp/0.12.2/deps/v8/include/v8.h:3605:8: error: initializing argument 4 of ‘void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetterCallback, v8::NamedPropertySetterCallback, v8::NamedPropertyQueryCallback, v8::NamedPropertyDeleterCallback, v8::NamedPropertyEnumeratorCallback, v8::Handlev8::Value)’ [-fpermissive] ../src/node-proxy.cc:1519:43: error: invalid conversion from ‘v8::Handlev8::Array ()(const int&)’ to ‘v8::NamedPropertyEnumeratorCallback {aka void ()(const v8::PropertyCallbackInfov8::Array&)}’ [-fpermissive] In file included from ../src/./node-proxy.h:37:0, from ../src/node-proxy.cc:33: /root/.node-gyp/0.12.2/deps/v8/include/v8.h:3605:8: error: initializing argument 5 of ‘void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetterCallback, v8::NamedPropertySetterCallback, v8::NamedPropertyQueryCallback, v8::NamedPropertyDeleterCallback, v8::NamedPropertyEnumeratorCallback, v8::Handlev8::Value)’ [-fpermissive] ../src/node-proxy.cc:1534:40: error: invalid conversion from ‘v8::Handlev8::Value (_)(uint32t, const int&) {aka v8::Handlev8::Value ()(unsigned int, const int&)}’ to ‘v8::IndexedPropertyGetterCallback {aka void (*)(unsigned int, const v8::PropertyCallbackInfov8::Value&)}’ [-fpermissive] In file included from ../src/./node-proxy.h:37:0, from ../src/node-proxy.cc:33: /root/.node-gyp/0.12.2/deps/v8/include/v8.h:3629:8: error: initializing argument 1 of ‘void v8::ObjectTemplate::SetIndexedPropertyHandler(v8::IndexedPropertyGetterCallback, v8::IndexedPropertySetterCallback, v8::IndexedPropertyQueryCallback, v8::IndexedPropertyDeleterCallback, v8::IndexedPropertyEnumeratorCallback, v8::Handlev8::Value)’ [-fpermissive] ---- several more errors like the above then: 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:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Linux 3.2.0-4-amd64 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /var/www/BadgeKit/openbadges-badgekit/node_modules/client-sessions/node_modules/node-proxy gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok

dtrace-provider@0.2.8 install /var/www/BadgeKit/openbadges-badgekit/node_modules/messina/node_modules/bunyan/node_modules/dtrace-provider node-gyp rebuild

make: Entering directory /var/www/BadgeKit/openbadges-badgekit/node_modules/messina/node_modules/bunyan/node_modules/dtrace-provider/build' TOUCH Release/obj.target/DTraceProviderStub.stamp make: Leaving directory/var/www/BadgeKit/openbadges-badgekit/node_modules/messina/node_modules/bunyan/node_modules/dtrace-provider/build'

npm WARN optional dep failed, continuing fsevents@0.2.1

node-sass@0.7.0 install /var/www/BadgeKit/openbadges-badgekit/node_modules/node-sass node build.js

child_process: customFds option is deprecated, use stdio instead. make: Entering directory /var/www/BadgeKit/openbadges-badgekit/node_modules/node-sass/build' CXX(target) Release/obj.target/binding/binding.o In file included from ../binding.cpp:7:0: ../sass_context_wrapper.h:10:3: error: ‘uv_work_t’ does not name a type ../sass_context_wrapper.h:20:3: error: ‘uv_work_t’ does not name a type ../binding.cpp:13:20: error: variable or field ‘WorkOnContext’ declared void ../binding.cpp:13:20: error: ‘uv_work_t’ was not declared in this scope ../binding.cpp:13:31: error: ‘req’ was not declared in this scope ../binding.cpp:19:22: error: variable or field ‘MakeOldCallback’ declared void ../binding.cpp:19:22: error: ‘uv_work_t’ was not declared in this scope ../binding.cpp:19:33: error: ‘req’ was not declared in this scope make: *** [Release/obj.target/binding/binding.o] Error 1 make: Leaving directory/var/www/BadgeKit/openbadges-badgekit/node_modules/node-sass/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:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Linux 3.2.0-4-amd64 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /var/www/BadgeKit/openbadges-badgekit/node_modules/node-sass gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok Build failed npm ERR! Linux 3.2.0-4-amd64 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code ELIFECYCLE

npm ERR! node-proxy@0.6.0 install: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-proxy@0.6.0 install script 'node-gyp configure build'. npm ERR! This is most likely a problem with the node-proxy package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get their info via: npm ERR! npm owner ls node-proxy npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /var/www/BadgeKit/openbadges-badgekit/npm-debug.log

dbair commented 9 years ago

additional note, I am using node v0.12.2.

threeqube commented 9 years ago

As per this thread: https://groups.google.com/forum/#!searchin/openbadges-dev/badgekit$20node$20version/openbadges-dev/I2zeBDPF8qM/pBGZgTtziQAJ

try this version of node: 0.10.24 in package.json.

dbair commented 9 years ago

Thank you for the help. When I run npm start for BadgeKit, it does not indicate the location the app is at as the instructions state. "You should again see an indicator of the location the app is at - open BadgeKit in the browser using the URL and port number." When I try to browse to localhost:3000 I get "Unable to Connect" When I browse to localhost:8080 I get {"app":"BadgeKit API","version":"0.2.22"}

Suggestions?

patriclougheed commented 9 years ago

I went through something very similar last week when I was do my setup with v0.10.38. Your API is running but the app is not probably because the dependencies were not installed fully. Are you running the install as root or using sudo -i? I found that npm gets flaky and I have to run the install a couple of times using sudo. After all your trouble you might find that Badgekit will not fully work anyway. There are some issues that cause most of the app to throw 500 errors which I have also experienced. See https://github.com/mozilla/openbadges-badgekit/issues/475

dbair commented 9 years ago

I performed the install as root.

patriclougheed commented 9 years ago

I would try creating a user, logging in and use sudo. My install failed when I used sudo -i but went fine using sudo. Dunno why.

dbair commented 9 years ago

sudo npm install (or npm install as root): npm WARN package.json express-persona-observer@0.0.2 No repository field. npm http GET https://registry.npmjs.org/minstache npm http GET https://registry.npmjs.org/express-persona npm http GET https://registry.npmjs.org/jws npm http GET https://registry.npmjs.org/mime npm http GET https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/jws npm http 304 https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/mime npm http 304 https://registry.npmjs.org/express-persona npm WARN deprecated jws@0.2.6: Security update: Versions below 3.0.0 are deprecated. npm http GET https://registry.npmjs.org/base64url/0.0.6 npm http GET https://registry.npmjs.org/jwa/0.0.1 npm http GET https://registry.npmjs.org/qs npm http GET https://registry.npmjs.org/json-stringify-safe npm http GET https://registry.npmjs.org/forever-agent npm http GET https://registry.npmjs.org/node-uuid npm http GET https://registry.npmjs.org/tough-cookie npm http GET https://registry.npmjs.org/tunnel-agent npm http GET https://registry.npmjs.org/form-data npm http GET https://registry.npmjs.org/http-signature npm http GET https://registry.npmjs.org/oauth-sign npm http GET https://registry.npmjs.org/hawk npm http GET https://registry.npmjs.org/aws-sign2 npm http 304 https://registry.npmjs.org/minstache npm http GET https://registry.npmjs.org/commander/1.0.4 npm http GET https://registry.npmjs.org/browserid-verify npm http GET https://registry.npmjs.org/connect npm http 304 https://registry.npmjs.org/forever-agent npm http 304 https://registry.npmjs.org/node-uuid npm http 304 https://registry.npmjs.org/tough-cookie npm http 304 https://registry.npmjs.org/qs npm http 304 https://registry.npmjs.org/base64url/0.0.6 npm http 304 https://registry.npmjs.org/tunnel-agent npm http 304 https://registry.npmjs.org/json-stringify-safe npm http 304 https://registry.npmjs.org/form-data npm http 304 https://registry.npmjs.org/jwa/0.0.1 npm http 304 https://registry.npmjs.org/http-signature npm http 304 https://registry.npmjs.org/oauth-sign npm http 304 https://registry.npmjs.org/aws-sign2 npm http 304 https://registry.npmjs.org/hawk npm http 304 https://registry.npmjs.org/browserid-verify npm http 304 https://registry.npmjs.org/connect npm http 304 https://registry.npmjs.org/commander/1.0.4 npm http GET https://registry.npmjs.org/combined-stream npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/keypress npm http GET https://registry.npmjs.org/ctype/0.5.3 npm http GET https://registry.npmjs.org/assert-plus npm http GET https://registry.npmjs.org/asn1/0.1.11 npm http GET https://registry.npmjs.org/tunnel npm http GET https://registry.npmjs.org/punycode npm http GET https://registry.npmjs.org/hoek npm http GET https://registry.npmjs.org/boom npm http GET https://registry.npmjs.org/cryptiles npm http GET https://registry.npmjs.org/sntp npm http 304 https://registry.npmjs.org/combined-stream npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/asn1/0.1.11 npm http 304 https://registry.npmjs.org/keypress npm http 304 https://registry.npmjs.org/assert-plus npm http GET https://registry.npmjs.org/delayed-stream/0.0.5 npm http 304 https://registry.npmjs.org/punycode npm http 304 https://registry.npmjs.org/ctype/0.5.3 npm http 304 https://registry.npmjs.org/hoek npm http 304 https://registry.npmjs.org/boom npm http 304 https://registry.npmjs.org/tunnel npm http 304 https://registry.npmjs.org/cryptiles npm http 304 https://registry.npmjs.org/sntp npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5 npm http GET https://registry.npmjs.org/qs/0.6.5 npm http GET https://registry.npmjs.org/cookie-signature/1.0.1 npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1 npm http GET https://registry.npmjs.org/cookie/0.1.0 npm http GET https://registry.npmjs.org/send/0.1.4 npm http GET https://registry.npmjs.org/bytes/0.2.0 npm http GET https://registry.npmjs.org/fresh/0.2.0 npm http GET https://registry.npmjs.org/pause/0.0.1 npm http GET https://registry.npmjs.org/uid2/0.0.2 npm http GET https://registry.npmjs.org/debug npm http GET https://registry.npmjs.org/methods/0.0.1 npm http GET https://registry.npmjs.org/raw-body/0.0.3 npm http GET https://registry.npmjs.org/negotiator/0.2.8 npm http GET https://registry.npmjs.org/multiparty/2.2.0 npm http 304 https://registry.npmjs.org/qs/0.6.5 npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1 npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1 npm http 304 https://registry.npmjs.org/bytes/0.2.0 npm http 304 https://registry.npmjs.org/pause/0.0.1 npm http 304 https://registry.npmjs.org/cookie/0.1.0 npm http 304 https://registry.npmjs.org/send/0.1.4 npm http 304 https://registry.npmjs.org/fresh/0.2.0 npm http 304 https://registry.npmjs.org/debug npm http 304 https://registry.npmjs.org/multiparty/2.2.0 npm http 304 https://registry.npmjs.org/uid2/0.0.2 npm http 304 https://registry.npmjs.org/raw-body/0.0.3 npm http 304 https://registry.npmjs.org/methods/0.0.1 npm http 304 https://registry.npmjs.org/negotiator/0.2.8 npm http GET https://registry.npmjs.org/range-parser/0.0.4 npm http GET https://registry.npmjs.org/ms/0.7.0 npm http 304 https://registry.npmjs.org/range-parser/0.0.4 npm http 304 https://registry.npmjs.org/ms/0.7.0 npm http GET https://registry.npmjs.org/readable-stream npm http GET https://registry.npmjs.org/stream-counter npm http 304 https://registry.npmjs.org/readable-stream npm http 304 https://registry.npmjs.org/stream-counter npm http GET https://registry.npmjs.org/core-util-is npm http GET https://registry.npmjs.org/isarray/0.0.1 npm http GET https://registry.npmjs.org/string_decoder npm http GET https://registry.npmjs.org/inherits npm http 304 https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/isarray/0.0.1 npm http 304 https://registry.npmjs.org/core-util-is npm http 304 https://registry.npmjs.org/inherits badgekit-api-client@0.2.2 node_modules/badgekit-api-client ├── mime@1.2.11 ├── jws@0.2.6 (jwa@0.0.1, base64url@0.0.6) └── request@2.31.0 (json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, qs@0.6.6, tunnel-agent@0.3.0, oauth-sign@0.3.0, node-uuid@1.4.3, tough-cookie@0.9.15, form-data@0.1.4, http-signature@0.10.1, hawk@1.0.0)

express-persona-observer@0.0.2 node_modules/express-persona-observer ├── minstache@1.1.0 (commander@1.0.4) └── express-persona@0.1.2 (browserid-verify@0.1.2, connect@2.9.2)

sudo npm start (or npm start as root) still gives no output and unable to browse to localhost:3000.

patriclougheed commented 9 years ago

Looks promising! Did you try starting with foreman https://github.com/mozilla/openbadges-badgekit/wiki/BadgeKit-Self-Hosting-Guide#running-badgekit or running with node (with config.json in root)?

dbair commented 9 years ago

Yes. npm runs node and there is a config.json in the "root" folder (openbadges-badgekit).

patriclougheed commented 9 years ago

Try "node /var/www/BadgeKit/openbadges-badgekit/app/index.js" so you can see what fails.

dbair commented 9 years ago

That worked. I wonder why npm start does not work?????

Thank you for all your help!

dbair commented 9 years ago

Thanks for all the help.

threeqube commented 9 years ago

:thumbsup: