getcahoots / api

The RESTful API
http://cahoots.pw
MIT License
1 stars 0 forks source link

error on npm start fails on Linux Ubuntu #22

Closed manu-g closed 9 years ago

manu-g commented 9 years ago

Steps taken:

  1. clone api repo
  2. run npm install
  3. run npm start

This returns an error. Below is the content of the npm-debug.log:

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/iojs', '/usr/bin/npm', 'start' ] 2 info using npm@2.8.3 3 info using node@v1.8.1 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info prestart cahoots-api@1.0.0 6 info start cahoots-api@1.0.0 7 verbose unsafe-perm in lifecycle true 8 info cahoots-api@1.0.0 Failed to exec start script 9 verbose stack Error: cahoots-api@1.0.0 start: npm install && ./bin/cahoots-api 9 verbose stack Exit status 1 9 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16) 9 verbose stack at emitTwo (events.js:87:13) 9 verbose stack at EventEmitter.emit (events.js:169:7) 9 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14) 9 verbose stack at emitTwo (events.js:87:13) 9 verbose stack at ChildProcess.emit (events.js:169:7) 9 verbose stack at maybeClose (child_process.js:953:16) 9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1020:5) 10 verbose pkgid cahoots-api@1.0.0 11 verbose cwd /mnt/55A8190F0A50BDCD/EigeneDateien/Entwicklung/git/cahoots_github/api 12 error Linux 3.19.0-18-generic 13 error argv "/usr/bin/iojs" "/usr/bin/npm" "start" 14 error node v1.8.1 15 error npm v2.8.3 16 error code ELIFECYCLE 17 error cahoots-api@1.0.0 start: npm install && ./bin/cahoots-api 17 error Exit status 1 18 error Failed at the cahoots-api@1.0.0 start script 'npm install && ./bin/cahoots-api'. 18 error This is most likely a problem with the cahoots-api package, 18 error not with npm itself. 18 error Tell the author that this fails on your system: 18 error npm install && ./bin/cahoots-api 18 error You can get their info via: 18 error npm owner ls cahoots-api 18 error There is likely additional logging output above. 19 verbose exit [ 1, true ]

akoenig commented 9 years ago

Hi @manu-g,

this error should not occur anymore. The master branch was a little behind and we focused on working on the new release which lived in the develop branch.

I merged everything over to master and you should be able to run the API on your machine now:

git clone https://github.com/getcahoots/api
cd api

CAHOOTS_PROVIDER_OFFICIAL_DATABASE_PATH=/Users/akoenig/databases/cahoots \
CAHOOTS_PROVIDER_OFFICIAL_SHEET_KEY=1OS_RBbkzCNLpVAc2aQHQAahSoLuw8wzPg6Hiz_azHPw \
CAHOOTS_PROVIDER_OFFICIAL_SYNC_INTERVAL=300000 \
CAHOOTS_PROVIDER_TORIAL_API_ENDPOINT=<the-full-url-to-the-torial-api> \
CAHOOTS_PROVIDER_TORIAL_DATABASE_PATH=/Users/akoenig/databases/torial \
CAHOOTS_PROVIDER_TORIAL_SYNC_INTERVAL=3600000 \
DEBUG=cahoots:* npm start

Please note that the respective databases directory has to be created up-front.

Afterwards you can point your browser to a specific API route, e.g. http://localhost:9090/v2/persons.

All the best :)

/André