Lissy93 / twitter-sentiment-visualisation

🌍 Sentiment analysis over real-time social media data, rendering live charts to visualise trends
211 stars 68 forks source link

NPM Run Config Error #8

Closed BasharAG closed 6 years ago

BasharAG commented 7 years ago

I fixed my bower missing dependencies issues in another issue thread, but after running NPM RUN CONFIG, I get the following error (note I have the latest nodejs and NPM):

/twitter-sentiment-visualisation$ npm run config

> twitter-sentiment-visualisation@0.0.1 config /home/ubuntu/twitter-sentiment-visualisation
> gulp generate-config && start notepad 'config\src\keys.coffee'

[14:48:52] Using gulpfile ~/twitter-sentiment-visualisation/gulpfile.js
[14:48:52] Starting 'generate-config'...
[14:48:52] Finished 'generate-config' after 476 μs
sh: 1: start: not found

npm ERR! Linux 4.4.0-1013-aws
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v7.9.0/bin/node" "/home/ubuntu/.nvm/versions/node/v7.9.0/bin/npm" "run" "config"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! twitter-sentiment-visualisation@0.0.1 config: `gulp generate-config && start notepad 'config\src\keys.coffee'`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the twitter-sentiment-visualisation@0.0.1 config script 'gulp generate-config && start notepad 'config\src\keys.coffee''.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the twitter-sentiment-visualisation package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp generate-config && start notepad 'config\src\keys.coffee'
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs twitter-sentiment-visualisation
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls twitter-sentiment-visualisation
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/.npm/_logs/2017-04-20T14_48_52_913Z-debug.log
Lissy93 commented 7 years ago

This is an error, thanks for submitting - I will look into it

But basically what that gulp command does is just create a file called keys.json, from this file: https://github.com/Lissy93/twitter-sentiment-visualisation/blob/dev/server-side-source/config/sample-keys.coffee for you to populate it. So in the meantime you can just create it manually by copy and pasting that sample file

ianmyles commented 7 years ago

Hi Lissy thanks for the update. I've signed up for all the keys but I'm still getting an error from /routes/entity-extraction.js:41 ref = Object.keys(data);

As far as I can diagnose it still seems to be having an issues determining the credentials in keys.coffee.

Ian

Lissy93 commented 7 years ago

ok, so if you include these keys after the Twitter key, in your config/keys.json:

exports.googlePlaces = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

exports.hp = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

exports.watson =
  username: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
  password: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

You can sign up for the keys you don't yet have, here:

HP Haven OnDemand: http://www.havenondemand.com/login.html?signUp=true IBM Watson: https://www.ibm.com/account/us-en/signup/register.html?Target=https://myibm.ibm.com/ Google Developer: https://console.developers.google.com/apis/dashboard Twitter Developer: https://dev.twitter.com/resources/signup

Lissy93 commented 6 years ago

Fixed. May require further cross-system testing, so please re-open if the same error is still occurring in your specific environment (and give full details for your setup, so we can try and reproduce).

nithin7vnnr commented 6 years ago

After running NPM RUN CONFIG, I get the following error (note I have the latest nodejs and NPM):


nithin@nithin-VirtualBox:~/twitter-sentiment-visualisation$ sudo npm run config

twitter-sentiment-visualisation@1.5.0 config /home/nithin/twitter-sentiment-visualisation gulp generate-config && start notepad 'config\src\keys.coffee'

[11:39:20] Using gulpfile ~/twitter-sentiment-visualisation/gulpfile.js [11:39:20] Starting 'generate-config'... [11:39:20] Finished 'generate-config' after 354 μs start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! twitter-sentiment-visualisation@1.5.0 config: gulp generate-config && start notepad 'config\src\keys.coffee' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the twitter-sentiment-visualisation@1.5.0 config script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/nithin/.npm/_logs/2018-04-29T06_09_20_518Z-debug.log