These are chat archives for ushahidi/Community

27th
Sep 2018
Ushbot
@ushbot
Sep 27 2018 00:04
[Invoq John Majone] ... and when I enter the URL: localhost:3000 in the browser, I get an error on the browser saying: Found bindings for the following environments - Linux 64-bit with Node.js 6.x. Any help would be appreciated... I will post the entire error in the following message.
Ushbot
@ushbot
Sep 27 2018 00:12
[Invoq John Majone] I am pretty sure it is a node.js version issue, however, the README.md file in the platform-client folder says to install v6, and so I use nvm to install 6, and so it installs 6.14.1. Nevertheless, I am not sure if that is the right version to install
Ushbot
@ushbot
Sep 27 2018 12:48
[David Losada, Ushahidi] did you try the solution that the error output suggested? (running npm rebuild node-sass)
[David Losada, Ushahidi] that or you could try removing the node_modules folder and running npm install again
[Invoq John Majone] yeah, just did, however, it said it was fine somehow... so now I'm running npm rebuild node-sass --force
[Invoq John Majone] Pls where would my `node_modules` directory be located?
[David Losada, Ushahidi] it’s the same folder where you cloned the client, where you are running gulp
[David Losada, Ushahidi] node_modules is a folder containing all the dependencies downloaded by npm
[David Losada, Ushahidi] that’s how nodejs rolls
[David Losada, Ushahidi] On a separate note, we are still working on that 4.0 release. We are dealing with a few remaining consequences of switching the framework to lumen. As a personal goal, I’m going to look into automatically publishing pre-built docker container images to docker hub, along with an example docker-compose
Ushbot
@ushbot
Sep 27 2018 12:53
[Invoq John Majone] ok... thanks. The rebuild finished, however, after running sudo gulp, I still get the error: webpack: failed to compile
[David Losada, Ushahidi] what do you get if you run gulp build ?
[Invoq John Majone] I think this issue was created because I installed nodejs v8 first, before using nvm to change nodejs to v6... Don't know let me run it now...
[Invoq John Majone] running it now...
[Invoq John Majone] [13:56:28] Finished 'dist:webpack' after 1 min
[13:56:28] Finished 'dist' after 1 min
[13:56:28] Starting 'build'...
[13:56:28] Finished 'build' after 45 μs
[David Losada, Ushahidi] mm interesting, that looks good
[David Losada, Ushahidi] are there fires under the server/www folder?
[David Losada, Ushahidi] *files =D
Ushbot
@ushbot
Sep 27 2018 12:58
[Invoq John Majone] yes... that's my /var/www you mean, right?
[David Losada, Ushahidi] I mean.. server/www relative to where you run gulp build
[David Losada, Ushahidi] so if you run it from /my/client/folder .. that would me /my/client/folder/server/www
[David Losada, Ushahidi] *be
[David Losada, Ushahidi] I clearly need that coffee break
[Invoq John Majone] yeah, there are quite a few files there... .eot and .js files
[David Losada, Ushahidi] so.. it builds
[David Losada, Ushahidi] what did you intend to do? build it so you could serve it from apache/nginx? or run a dev server so you could make changes to files and immediately check the changes?
[Invoq John Majone] :D sorry to be a bother... So what do u think the issue could be?
[David Losada, Ushahidi] no idea really.. the webpack build is the same in both cases
[Invoq John Majone] I intend to develop with it... I have successfully installed the API, however, this error has been hindering me from doing anything, as when I go to localhost:3000, it displays some css errors
Ushbot
@ushbot
Sep 27 2018 13:05
[David Losada, Ushahidi] a typical issue when using sudo is that it just solves any permissions problem for the command you are trying to run, but causes more, and less apparent, permissions problems for consecutive commands
[David Losada, Ushahidi] I’d say maybe start from scratch with the same repo, but avoid sudo
Ushbot
@ushbot
Sep 27 2018 13:19
[Romina Suarez, Ushahidi] @invoq two things since you intend to develop
1 - you pulled from platform-client , not platform-release right?
2 - If answer to (1) is YES, then you can run gulp or npm run watch instead of gulp build for faster feedback while doing development, it’ll rebuild as you make changes and serve it in whatever the port you selected in .ENV is (so http://localhost:3000 if PORT=3000)
[Romina Suarez, Ushahidi] also, localhost:3000 will really only work for this approach, if you are building for /dist, then you need to serve it from nginx as a static web app
[Romina Suarez, Ushahidi] (assuming PORT=3000 in the .ENV file )
[Invoq John Majone] Ok, for now, I'm only just installing for dev, to get accustomed to the system...
Ushbot
@ushbot
Sep 27 2018 13:25
[Invoq John Majone] However, the ERROR I'm getting on the browser is:- Module build failed: Error: Missing binding /var/www/platform-client/node_modules/node-sass/vendor/linux-x64-57/binding.node

[Romina Suarez, Ushahidi] right. then my only suggestion is that you delete node_modules , then do
npm install
npm rebuild node-sass
npm install gulp (note this will install gulp in the project’s node_modules instead of globally)

Then do node_modules/gulp/bin/gulp.js to run the watcher.

[Romina Suarez, Ushahidi] all without sudo
[Invoq John Majone] Ok thanks, will remove all and run the following commands without sudo... Cheers!!
Ushbot
@ushbot
Sep 27 2018 13:30
[Romina Suarez, Ushahidi] cool, have a nice day.
Ushbot
@ushbot
Sep 27 2018 17:48
[Invoq John Majone] Hi guys, I managed to get it to install by getting the right node version installed. However, when I login and try to change the `Settings -> General`, the `SAVE` button is disabled. Does anyone know what's happening here pls?
Ushbot
@ushbot
Sep 27 2018 17:53
[Romina Suarez, Ushahidi] probably a validation error. I’d take a look at all the values changed and see if something is wrong.
Any chance the Contact email address field is invalid, or that the lat/lon fields are empty? I just noticed our validation message for the email and lat/lon fields is not being displayed (filing a bug report in a minute) .