3scale-labs / 3scale_ws_api_for_nodejs

3scale is an API Infrastructure service which handles API Keys, Rate Limiting, Analytics, Billing Payments and Developer Management. Includes a configurable API dashboard and developer portal CMS. More product stuff at http://www.3scale.net/, support information at http://support.3scale.net/.
http://www.3scale.net
MIT License
22 stars 13 forks source link

Node 0.10 #7

Closed nmathon closed 10 years ago

nmathon commented 10 years ago

Does this version work with node 0.10 ? I have no error, but trafic is not displayed on 3scale console (but authentication works fine). Unit tests are not working :-1:

/var/www/***/node_modules/3scale/test/authorize_response_test.coffee:1
tion (exports, require, module, __filename, __dirname) { vows = require 'vows'
                                                                        ^^^^^^
SyntaxError: Unexpected string
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /usr/local/lib/node_modules/vows/bin/vows:567:19
    at Array.reduce (native)
    at importSuites (/usr/local/lib/node_modules/vows/bin/vows:560:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/vows/bin/vows:290:15)
vdel26 commented 10 years ago

It works ok with node v0.10 (I just tried with v0.10.12). The problem here seems to be that you are missing dependencies, in this case "vows". After you install the 3scale module you must also install its dependencies. Move into the root folder for the 3scale module and run:

npm install

to install all dependencies. Then you will be able to run the test suite by calling:

./node_modules/vows/bin/vows test/* --spec

You can also install the vows binary globally (npm install -g vows) and then you will be able to do:

vows test/* --spec

I hope that solves your problem.

nmathon commented 10 years ago

Hello,

It work when I install vows locally, not globally. Don't know why... But thanks for your reply, it solved my problem.

Nicolas