These are chat archives for ushahidi/Community

27th
Apr 2018
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:00
image.png
I'm getting this error when I try to run npm install in the platform client now, even using sudo. I've followed the steps suggested on npmjs.com for reducing permission errors but I still see this
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:27
image.png
ok, i resolved that error, however I when I run gulp in the platform client and go to localhost:3000 I see this:
any idea @anna, @rowasc ?
Ushbot
@ushbot
Apr 27 2018 09:38
[Anna Iosif, Ushahidi] Hi @sebm90! Have you tried going to node_modules/ushahidi-pattern-library in your platform-client and run npm install
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:40
hmm I there's no ushahidi-pattern-library in my node_modules directory
I updated package.json to point to a forked version of the pattern library (I want to make customisations to the CSS) and ran npm install though
ok, I reran npm install and it appeared
Ushbot
@ushbot
Apr 27 2018 09:45
[Anna Iosif, Ushahidi] Perfect, now go to the pattern-library-folder and run npm install there as well
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:45
@anna after running npm install in node_modules/ushahidi-platform-pattern-library, I see this error when I run gulp:
image.png
I think webpack can't find my version of the pattern library?
Ushbot
@ushbot
Apr 27 2018 09:45
[Anna Iosif, Ushahidi] hm, try running gulp build
[Anna Iosif, Ushahidi] in the client, not pattern-library
[Anna Iosif, Ushahidi] what does it say after “ushahidi-pattern-library” in your package.json file in the client?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:48
I modified it to:
"ushahidi-platform-pattern-library": "github:sebm90/platform-pattern-library-2"
I get the same error after running gulp build
do you think I need to modify webpack.config.js in some way?
Ushbot
@ushbot
Apr 27 2018 09:49
[Anna Iosif, Ushahidi] no, i think its the pattern-library path that is not working, trying to reproduce it here
[Sotheara Sok] Hi there
Could you tell me about how to use ushahid V3 api to get data?
have try following the document but it is not working for me?
[Anna Iosif, Ushahidi] Ok, it works for me, what I did was: 1, close down if you have any tab running with gulp for the client
[Anna Iosif, Ushahidi] 2. delete your ushahidi-pattern-library from node_modules in the client
[Anna Iosif, Ushahidi] 3. run npm install in the client
[Anna Iosif, Ushahidi] 4. cd into node_modules/ushahidi-pattern-library and run ‘npm install’
[Anna Iosif, Ushahidi] 5. cd back to the client and run ‘gulp’
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:56
I followed those steps and I'm getting exactly the same error
:(
Ushbot
@ushbot
Apr 27 2018 09:57
[Anna Iosif, Ushahidi] if you look in your terminal window, do you see any errors there?
[Anna Iosif, Ushahidi] after running gulp?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 09:58
yes, I see the same errors that I see in my browser
Ushbot
@ushbot
Apr 27 2018 09:59
[Anna Iosif, Ushahidi] Hm, ok go to node_modules/ushahidi-pattern-library/assets
[Anna Iosif, Ushahidi] do you see the missing files there?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:00
no, there's no CSS folder
Ushbot
@ushbot
Apr 27 2018 10:00
[Anna Iosif, Ushahidi] ah, ok, there is the error
[Anna Iosif, Ushahidi] cd back to node_modules/ushahidi-pattern-library/
[Anna Iosif, Ushahidi] and run npm install again just to be sure, do you see any errors when you do that?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:01
no, I don't see any errors
Ushbot
@ushbot
Apr 27 2018 10:01
[Anna Iosif, Ushahidi] ok, run “gulp build”
[Anna Iosif, Ushahidi] in the same folder
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:02
ok
Ushbot
@ushbot
Apr 27 2018 10:03
[Anna Iosif, Ushahidi] any errors now?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:03
no errors
but the css directory still isn't in ushahidi-platform-pattern-library/assets
Ushbot
@ushbot
Apr 27 2018 10:04
[Anna Iosif, Ushahidi] ok, do you know if you have browserify installed?
[Anna Iosif, Ushahidi] try running ” npm install -g browserify”
[Anna Iosif, Ushahidi] you might need to do that with “sudo npm install -g browserify”
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:05
ok, I installed it
Ushbot
@ushbot
Apr 27 2018 10:06
[Anna Iosif, Ushahidi] ok, run npm install again from the node_modules/ushahidi-pattern-library/ folder
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:06
done
I still don't see a css directory
Ushbot
@ushbot
Apr 27 2018 10:07
[Anna Iosif, Ushahidi] run gulp build
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:08
done, no luck
the pattern library I'm using on github doesn't have the css directory either, could that be the problem?
Ushbot
@ushbot
Apr 27 2018 10:10
[Anna Iosif, Ushahidi] no, that should be ok, it really should add it when running npm install
[Anna Iosif, Ushahidi] try installing gulp globally as well, not sure if that helps since it seem to work in the client, but worth a try: sudo npm install -g gulp
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:12
ok, done
shall I npm install again in the pattern-library directory?
Ushbot
@ushbot
Apr 27 2018 10:13
[Anna Iosif, Ushahidi] yes
[Anna Iosif, Ushahidi] and send me a screenshot of your terminal when its done
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:20
is there a way I can send you the screenshot via PM?
Ushbot
@ushbot
Apr 27 2018 10:20
[Anna Iosif, Ushahidi] you can send it here
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:21
I don't see an option to send via PM?
Ushbot
@ushbot
Apr 27 2018 10:22
[Anna Iosif, Ushahidi] You can send it like you did with the other screenshots, in the channel, there is no PM-options in this channel I am afraid
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:23
image.png
there weren't any errors
Ushbot
@ushbot
Apr 27 2018 10:24
[Anna Iosif, Ushahidi] this is really strange
[Anna Iosif, Ushahidi] Have you worked with the pattern-library yourself? Did you run it locally on your computer?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:27
I haven't touched the pattern library, I just forked the repo
I ran it once but it doesn't work - I see the same as here: http://github.ushahidi.org/platform-pattern-library/
the CSS and HTML don't get loaded, seems to be a MIME type issue
I didn't know if that was related to my issue
sorry, meant the CSS and JS don't get loaded
Ushbot
@ushbot
Apr 27 2018 10:31
[Anna Iosif, Ushahidi] try changing to “ushahidi-platform-pattern-library”: “3.11.0-rc.1" in your package.json file and run npm install in the client
[Anna Iosif, Ushahidi] just to see if that works
[Anna Iosif, Ushahidi] because that should really work
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:31
that worked before, I'll try again to confirm
hmm, now that gives me the same error as before
Ushbot
@ushbot
Apr 27 2018 10:42
[Anna Iosif, Ushahidi] ok, it sounds like something in your setup is wrong, have you changed other things too? In webpack for example?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:42
I didn't change anything, in fact I reinstalled the platform client from github this morning
Ushbot
@ushbot
Apr 27 2018 10:44
[Anna Iosif, Ushahidi] ok, this is super-wierd, it really should work! try once more to delete the whole node_modules-folder and run npm install again,
[Anna Iosif, Ushahidi] if that doesnt work now, I’ll send you the css-folder from my setup and see if that works
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:46
I had the client working earlier this week, but I need to run it using my own version of the pattern library (since our goal is to customise the look and feel)
I get the same error after deleting node_modules and running npm install again
Ushbot
@ushbot
Apr 27 2018 10:57
[Anna Iosif, Ushahidi] have you stopped gulp from running and started it again?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 10:58
yes, it didn't work
Ushbot
@ushbot
Apr 27 2018 11:06
[Anna Iosif, Ushahidi] I need to step out for a bit, but I’ll be back in a bit
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 11:08
thanks Anna!
Ushbot
@ushbot
Apr 27 2018 13:46
[Anna Iosif, Ushahidi] Hi Sebastian, how is it going? Any luck?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 13:50
Hi Anna, no :(
Ushbot
@ushbot
Apr 27 2018 13:56
[Anna Iosif, Ushahidi] Ok, I just spoke to a colleague who recommended to start with removing node from your machine and reinstall it. Could you try that and then see if it works?
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 13:58
I've had a friend look at it, it seems the gulp task to compile the CSS doesn't work
even when I run "gulp sass" in the platform library
the css directory inside the pattern library isn't there
Ushbot
@ushbot
Apr 27 2018 14:00
[Anna Iosif, Ushahidi] it should be added by gulp build, its not there before that
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 14:00
yes, it's not added by gulp build for me
Ushbot
@ushbot
Apr 27 2018 14:03
[Anna Iosif, Ushahidi] ok, if you try one more thing before restarting with node
[Anna Iosif, Ushahidi] go back to the client
[Anna Iosif, Ushahidi] Make sure your package.json file points to your fork of your pattern-library, and run sudo npm install
[Anna Iosif, Ushahidi] and then, in the node_modules/ushahidi-pattern-library-folder
[Anna Iosif, Ushahidi] run sudo npm install
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 14:16
sudo npm throws up a permissions error:
image.png
should I just go ahead and reinstall node?
Ushbot
@ushbot
Apr 27 2018 14:20
[Anna Iosif, Ushahidi] Yes, try and do that, it seems to be something wierd there and also try this: https://docs.npmjs.com/getting-started/fixing-npm-permissions
Sebastian Nils Mitchell
@sebm90
Apr 27 2018 14:21
thanks
Ushbot
@ushbot
Apr 27 2018 19:10
[Lim Socheat] Hi Ushahidi, I am trying to use Public API in Ushahidi V3 https://wiki.ushahidi.com/display/WIKI/Ushahidi+3.x+REST+API
[Lim Socheat] but always redirect me to the 404 not found page.