Closed carolineoconnor closed 8 years ago
@carolineoconnor error is because you don't have the credentials in place when running locally.
VCAP_SERVICES
environment variable from bluemix into a VCAP_SERVICES.json
file you have locally.$ sh run.sh
You can also update the app.js
with username
and password
for each service including cloudant
I just double check and this is also mentioned in the README.md. See Running Locally
Thanks for your response. I did copy the the content of the VCAP_SERVICES environment variable from bluemix into a VCAP_SERVICES.json file which I have locally. I understand now why this wont work for me as I am currently trying to get this example up and running using Windows not UNIX therefore the run.sh file will not work.
Would it be possible for you to include a run.bat file as well so this example will work on Windows otherwise specify this limitation in the documentation.
Do you have an example for updating the app.js with the username and password for a service?
If you have git-bash
or cygwin
, you can execute sh run.sh
; otherwise, you can use something like:
set /P PATH=< VCAP_SERVICES.json
I'm not a windows guy but if none of those things work go to app.js
and in the line 11 add
process.env.VCAP_SERVICES = fs.readFileSync('VCAP_SERVICES.json');
Hi,
I am having a few issues with trying to setup the nycschoolfinder app which is one of the example application which was built using the Tradeoff analytics Watson service.
Issue 1:
The NYC School Finder example seems to be missing the instructions on deploying the app to Bluemix, or what prerequisites are required before trying to run locally.
Issue 2:
C:\IBM\Watson\nycschoolfinder-master\node_modules\watson-developer-cloud\lib\index.js:65 (C:\IBM\Watson\nycschoolfinder-master\app.js:28:27)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
throw new Error('Argument error: api_key or username and password Error: Argument error: api_key or username and password were not specified at Object.personality_insights (C:\IBM\Watson\nycschoolfinder-master\node_mo dules\watson-developer-cloud\lib\index.js:65:19) at Object.
Thanks,
Caroline