Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

BadgeKit install failed #479

Closed
dbair opened this issue Apr 23, 2015 · 13 comments
Closed

BadgeKit install failed #479

dbair opened this issue Apr 23, 2015 · 13 comments

Comments

@dbair
Copy link

dbair commented Apr 23, 2015

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 ()(uint32_t, 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

[email protected] 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 [email protected]

[email protected] 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! [email protected] install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Copy link
Author

dbair commented Apr 23, 2015

additional note, I am using node v0.12.2.

@threeqube
Copy link

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
Copy link
Author

dbair commented Apr 23, 2015

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
Copy link

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 #475

@dbair
Copy link
Author

dbair commented Apr 23, 2015

I performed the install as root.

@patriclougheed
Copy link

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
Copy link
Author

dbair commented Apr 23, 2015

sudo npm install (or npm install as root):
npm WARN package.json [email protected] 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 [email protected]: 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
[email protected] node_modules/badgekit-api-client
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/express-persona-observer
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])

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

@patriclougheed
Copy link

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
Copy link
Author

dbair commented Apr 23, 2015

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

@patriclougheed
Copy link

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

@dbair
Copy link
Author

dbair commented Apr 23, 2015

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

Thank you for all your help!

@dbair
Copy link
Author

dbair commented Apr 23, 2015

Thanks for all the help.

@dbair dbair closed this as completed Apr 23, 2015
@threeqube
Copy link

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants