liesen / libspotify-node Goto Github PK
View Code? Open in Web Editor NEWNode bindings for libspotify
Node bindings for libspotify
I found this little project which looks like just the thing I need for my current pet project.
But the sources doesn't compile any more - all classes subclassing EventEmitter will not compile as EventEmitter is removed from node.js.
Found this link where node-ncurses fixed the same problem.
https://groups.google.com/group/nodejs/browse_thread/thread/ae6bc0e37e2edc39?fwc=1
I could have seen if I can make it work myself, but have not been into c++ since 1999-something :-), and not into the c-parts of node either..
Hello,
First thanks for this great project ;) I'm not a C developer, i've done what i could to make it work, but i'm stuck.
I've installed libspotify 0.6, nodejs 0.2.6 and latest libspotify-node commit 9d5ec12
I had to make some very small changes in your source code in order to build...
here is what i've done : http://pastebin.com/NAVKu3NV
here is the patch : http://pastebin.com/hRpF9yDh
And finally the error from libspotify on first test:
running 8 tests
run test-login.js
node.js:63
throw e;
Error: libspotify.so.6: cannot open shared object file: No such file or directory
at Module._loadObjectSync (node.js:360:13)
at Module.loadSync (node.js:336:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at Object. (/home/ubuntu/libspotify-node/spotify/index.js:1:77)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
fail test-login.js -- status 1
ran 1 of 8 tests with 1 failure(s)
Any help / advices is welcome!
Hi guys,
This looks like an awesome idea! Nice work! I'd love to be able to make a Spotify-client in Node.js. My idea right now is to build a client that adds the feature of multiple users being able to vote up/down songs in a playlist to indirectly change the order of the songs in the playlist. Perfect for events where the participants can add/vote for songs but the play order cannot be interrupted unless enough votes determine that it should.
So...
I tried to download, install and run this code but I couldn't get it to work. Is it in a working state?
I began with installing Nodejs v0.1.102 and libspotify v0.0.4.
Then I cloned your git repo and ran "node-waf configure build test" but got this error:
$ node-waf configure build test
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /Users/vs/.node_libraries
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.057s)
Waf: Entering directory `/Users/vs/Sites/libspotify-node/build'
[ 1/11] cxx: src/search.cc -> build/default/src/search_1.o
[ 2/11] cxx: src/album.cc -> build/default/src/album_1.o
[ 3/11] cxx: src/artist.cc -> build/default/src/artist_1.o
[ 4/11] cxx: src/user.cc -> build/default/src/user_1.o
[ 5/11] cxx: src/track.cc -> build/default/src/track_1.o
[ 6/11] cxx: src/index.cc -> build/default/src/index_1.o
[ 7/11] cxx: src/playlistcontainer.cc -> build/default/src/playlistcontainer_1.o
[ 8/11] cxx: src/session.cc -> build/default/src/session_1.o
[ 9/11] cxx: src/playlist.cc -> build/default/src/playlist_1.o
[10/11] cxx: src/callback_queue.cc -> build/default/src/callback_queue_1.o
[11/11] cxx_link: build/default/src/search_1.o build/default/src/album_1.o build/default/src/artist_1.o build/default/src/user_1.o build/default/src/track_1.o build/default/src/index_1.o build/default/src/playlistcontainer_1.o build/default/src/session_1.o build/default/src/playlist_1.o build/default/src/callback_queue_1.o -> build/default/binding.node
Waf: Leaving directory `/Users/vs/Sites/libspotify-node/build'
'build' finished successfully (4.952s)
>>> running 7 tests
>>> run test-login.js
module:243
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module '../account'
at loadModule (module:243:13)
at require (module:374:12)
at Object.<anonymous> (/Users/vs/Sites/libspotify-node/test/test.js:4:15)
at Module._compile (module:423:23)
at Module._loadScriptSync (module:433:8)
at Module.loadSync (module:306:10)
at loadModule (module:251:12)
at require (module:374:12)
at Object.<anonymous> (/Users/vs/Sites/libspotify-node/test/test-login.js:1:63)
at Module._compile (module:423:23)
>>> fail test-login.js -- status 11
>>> ran 1 of 7 tests with 1 failure(s)
tests failed
So I cloned account.js.in to account.js and added my username, password and application key. Then I ran "node-waf configure build test" again and this is where I am stuck with this error:
$ node-waf configure build test
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /Users/vs/.node_libraries
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.036s)
Waf: Entering directory `/Users/vs/Sites/libspotify-node/build'
Waf: Leaving directory `/Users/vs/Sites/libspotify-node/build'
'build' finished successfully (0.968s)
>>> running 7 tests
>>> run test-login.js
>>> fail test-login.js -- status null
>>> ran 1 of 7 tests with 1 failure(s)
tests failed
Does this mean that it's not working at all? Or just that the test isn't working?
If I run "sudo node-waf install" it seems to work alright:
$ sudo node-waf install
Waf: Entering directory `/Users/vs/Sites/libspotify-node/build'
* installing build/default/binding.node as /Users/vs/.node_libraries/binding.node
Waf: Leaving directory `/Users/vs/Sites/libspotify-node/build'
'install' finished successfully (1.178s)
If I then try to run any of the examples like this, I get a segmentation fault:
$ node examples/logging_in.js
Segmentation fault
Maybe I just missed something easy? Maybe I'm trying this out before you have even remotely had a chance to finish it?
Thanks for your time.
Hi,
I just recently updated my Node to version 0.2.3 and now I started getting this error message when I run "node test/all.js":
$ node test/all.js
>>> running 8 tests
>>> run test-login.js
dyld: lazy symbol binding failed: Symbol not found: __ZN2v814ObjectTemplate25SetIndexedPropertyHandlerEPFNS_6HandleINS_5ValueEEEjRKNS_12AccessorInfoEEPFS3_jNS_5LocalIS2_EES6_EPFNS1_INS_7BooleanEEEjS6_ESG_PFNS1_INS_5ArrayEEES6_ES3_
Referenced from: ............/libspotify-node/spotify/binding.node
Expected in: flat namespace
dyld: Symbol not found: __ZN2v814ObjectTemplate25SetIndexedPropertyHandlerEPFNS_6HandleINS_5ValueEEEjRKNS_12AccessorInfoEEPFS3_jNS_5LocalIS2_EES6_EPFNS1_INS_7BooleanEEEjS6_ESG_PFNS1_INS_5ArrayEEES6_ES3_
Referenced from: ......../libspotify-node/spotify/binding.node
Expected in: flat namespace
>>> fail test-login.js -- status null
>>> ran 1 of 8 tests with 1 failure(s)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.