SIU-CS / Direct_Democracy-production

Real Time voting system to reflect public opinion
MIT License
1 stars 0 forks source link

Unable to install #22

Open amiangshu opened 7 years ago

amiangshu commented 7 years ago

@OuraniaSpantidi, @GregoryBrinkman , @Jazhan

I followed the instructions but it fails on npm install. Log attached below.

`h: 1: node: not found react-pouch-redux-starter-kit@0.0.1 /home/bosu/CS435/Direct_Democracy-production └─┬ pouchdb@5.4.5 └── pouchdb-collections@1.0.1

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.1 npm ERR! Linux 4.4.0-77-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

npm ERR! react-router@1.0.3 postinstall: node ./npm-scripts/postinstall.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the react-router@1.0.3 postinstall script 'node ./npm-scripts/postinstall.js'. 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 react-router package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./npm-scripts/postinstall.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-router npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-router npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/bosu/CS435/Direct_Democracy-production/npm-debug.log`

System: Ubuntu 16.04, npm, nodejs, and coucedb are already installed

GregoryBrinkman commented 7 years ago

'You need to manually create a symlink /usr/bin/node. Shortcut for bash compatible shells:

sudo ln -s which nodejs /usr/bin/node

Or if you use non-standard shells, just hardcode the path you find with which nodejs:

sudo ln -s /usr/bin/nodejs /usr/bin/node

Source: http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04

Try this and let me know the results. Thanks!

On Thu, May 11, 2017 at 4:02 PM Amiangshu Bosu notifications@github.com wrote:

@OuraniaSpantidi https://github.com/ouraniaspantidi, @GregoryBrinkman https://github.com/gregorybrinkman , @Jazhan https://github.com/jazhan

I followed the instructions but it fails on npm install. Log attached below.

`h: 1: node: not found react-pouch-redux-starter-kit@0.0.1 /home/bosu/CS435/Direct_Democracy-production └─┬ pouchdb@5.4.5 └── pouchdb-collections@1.0.1

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.1 npm ERR! Linux 4.4.0-77-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

npm ERR! react-router@1.0.3 postinstall: node ./npm-scripts/postinstall.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the react-router@1.0.3 postinstall script 'node ./npm-scripts/postinstall.js'. 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 react-router package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./npm-scripts/postinstall.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-router npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-router npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/bosu/CS435/Direct_Democracy-production/npm-debug.log`

System: Ubuntu 16.04, npm, nodejs, and coucedb are already installed

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SIU-CS/Direct_Democracy-production/issues/22, or mute the thread https://github.com/notifications/unsubscribe-auth/AOUt3yBNPOvqDsUdpw5I3DTurhQqTHSTks5r43degaJpZM4NYjPb .

amiangshu commented 7 years ago

Installation is successful. However, when I try to run:

ERROR in ./src/redux/actions.js Module not found: Error: Cannot resolve module 'react-router-redux' in /home/bosu/CS435/Direct_Democracy-production/src/redux @ ./src/redux/actions.js 35:24-53

GregoryBrinkman commented 7 years ago

Try npm install react-router-redux?

On Thu, May 11, 2017 at 4:24 PM Amiangshu Bosu notifications@github.com wrote:

Installation is successful. However, when I try to run:

ERROR in ./src/redux/actions.js Module not found: Error: Cannot resolve module 'react-router-redux' in /home/bosu/CS435/Direct_Democracy-production/src/redux @ ./src/redux/actions.js 35:24-53

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SIU-CS/Direct_Democracy-production/issues/22#issuecomment-300921122, or mute the thread https://github.com/notifications/unsubscribe-auth/AOUt34LAQK0ABfQ28RaDhYVTBlYwm42kks5r43yBgaJpZM4NYjPb .

amiangshu commented 7 years ago

Installation and run is successful. Should have included those in your installation instructions.

Now it runs but does not show any bill to vote (screenshot attached).

screenshot at 2017-05-11 16 33 41

OuraniaSpantidi commented 7 years ago

@amiangshu I forgot to mention that there were some extra npm modules' installations needed because each time I was changing a machine I was forgetting it myself. In order to see bills you have to go to scripts folder and run node titleParsing.js this is demarco's work. We didn't figure out a daily sync script in the end so you have to manually do it. Another thing I forgot to mention at the readme.

amiangshu commented 7 years ago

Other required modules include: nano, cheerios, and pouchdb. Those should be included in the instruction. Anyway, even after running the title parsing script, I do not see any bill. I cannot register either. When I press "Create account", nothing happens (no error message either).

OuraniaSpantidi commented 7 years ago

Nothing appears when you click on the "new user"? There should be a pop up window with input fields for username, password, demographics.

amiangshu commented 7 years ago

Yes, the popup appears. I filled out the form and clicked "Create account". But "Create account" does not do anything.

GregoryBrinkman commented 7 years ago

The information is registered in the database and you are logged in if you click on another page, instead of 'login' on the navbar, 'account' will be visible. Things are being done behind the scenes, but the design is not completely responsive. On Thu, May 11, 2017 at 8:26 PM Amiangshu Bosu notifications@github.com wrote:

Yes, the popup appears. I filled out the form and clicked "Create account". But "Create account" does not do anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SIU-CS/Direct_Democracy-production/issues/22#issuecomment-300959296, or mute the thread https://github.com/notifications/unsubscribe-auth/AOUt3wxq5DzcLMZDqTIKQtFWdLJ-MEn4ks5r47VAgaJpZM4NYjPb .

amiangshu commented 7 years ago

The entry is not actually stored in the database. direct-democracy

JS console also shows an error.

GregoryBrinkman commented 7 years ago

CORS must be enabled for data to be transmitted between ports on localhost (By default, this is off on Couchdb for security). If these commands don't work, the link offers other solutions.

npm install -g add-cors-to-couchdb add-cors-to-couchdb

https://github.com/pouchdb/add-cors-to-couchdb

amiangshu commented 7 years ago

When, I register there was not feedback (that's a poor design). Please check lecture 10 about UI design.

After enabling cors, I can see the bills. But I am not sure if the votes work. More errors. I would recommend you to install your application on a new virtual machine and figure out all the possible requirements. Clearly the installation instructions that you have added are not adequate.

errors

GregoryBrinkman commented 7 years ago

That last error comes from having couchdb version < 2.0. I wasn't able to resolve that on my linux machine, but instead had to run my server on a windows machine.

amiangshu commented 7 years ago

Please include a complete setup instruction for windows machine. I will try it on a windows machine tomorrow.

GregoryBrinkman commented 7 years ago

Hi @amiangshu , With the merging of #21, I believe the install can be done by following the updated README.md in master.