These are chat archives for FreeCodeCamp/Help

21st
Mar 2018
Nazar
@IsaakNazar
Mar 21 2018 02:00
@thekholm80 what could you suggest ? I tried couple youtube tutorial, but unfortunately they are already outdated
Kyle Holm
@thekholm80
Mar 21 2018 03:20
@IsaakNazar I just started a new project and I had to install older versions of webpack and webpack-dev-server because i didn't want to deal with figuring out the changes lol
Nazar
@IsaakNazar
Mar 21 2018 03:22
@thekholm80 when typing webpack-dev-server -v there should be the last version of dev-server right? Coz I got an exception
Kyle Holm
@thekholm80
Mar 21 2018 03:24
if you are trying to follow what i said earlier, it works with webpack^3.11.1 and webpack-dev-server^2.11.1. i had to roll back to these versions on my new project. if you want to read the docs for the new versions they will explain how to do the setup
Nazar
@IsaakNazar
Mar 21 2018 03:28
@thekholm80 I've spent my entire day to install f*ing webpack, and still no luck
I'm stupid
Kyle Holm
@thekholm80
Mar 21 2018 03:29
you're not stupid, webpack is a pain in the butt
Nazar
@IsaakNazar
Mar 21 2018 03:34
@thekholm80 have you ever tried create-react-app command?
Kyle Holm
@thekholm80
Mar 21 2018 03:34
yep
i don't personally use it, but it will do all the crappy parts for you
basically you install that, run it and have a working basic app in moments
Nazar
@IsaakNazar
Mar 21 2018 03:40
@thekholm80 can I use it to create multi page app? coz I tried react-router , but also with no luck
Kyle Holm
@thekholm80
Mar 21 2018 03:40
yep
i think react-router comes pre-configured in create-react-app? been a while since i looked at it
Nazar
@IsaakNazar
Mar 21 2018 04:16
@thekholm80 what is pros and cons create-react-app and installing manually all this stuff?
Kyle Holm
@thekholm80
Mar 21 2018 04:17
the pro is ease of use
0 to working in no time
the cons are you won't learn how to set up your own projects, and you will have a ton of stuff included that you don't need
Nazar
@IsaakNazar
Mar 21 2018 04:22
@ndburrus @thekholm80 ok thx
CamperBot
@camperbot
Mar 21 2018 04:22
isaaknazar sends brownie points to @ndburrus and @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1737 | @thekholm80 |http://www.freecodecamp.org/thekholm80
:star2: 2185 | @ndburrus |http://www.freecodecamp.org/ndburrus
Norvin Burrus
@ndburrus
Mar 21 2018 04:23
@IsaakNazar you're welcome! enjoy :+1:
Kyle Holm
@thekholm80
Mar 21 2018 04:23
yikes, that video is from 2016
i can't imagine much is still relevant
Nazar
@IsaakNazar
Mar 21 2018 04:26
the information is already outdated
I tried lots of them , nothing helps
Nazar
@IsaakNazar
Mar 21 2018 06:18
@thekholm80 finally my webpack webserver started to work , I cleaned cache npm cache clean --force and reinstalled each stuff individually(that was boring) lets see what happens next
@thekholm80 today I've spent 5 hours to run webserver :angry:
gishy1
@gishy1
Mar 21 2018 08:39
and did they use apis to pull user data from fb?
gishy1
@gishy1
Mar 21 2018 09:11
hello world how can import different fonts into codepen?
Stephen James
@sjames1958gm
Mar 21 2018 09:40
gishy1
@gishy1
Mar 21 2018 10:21
@sjames1958gm thanks bro you always pull through for me
CamperBot
@camperbot
Mar 21 2018 10:21
gishy1 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9124 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Mar 21 2018 10:21
@gishy1 :) no problem
BuntyBru
@BuntyBru
Mar 21 2018 12:29

listen EADDRINUSE 127.0.0.1:3000

i am getting this error
How to debug it?

I know it says address is in use
but it is not
@sjames1958gm
mate need help
Stephen James
@sjames1958gm
Mar 21 2018 12:33
@BuntyBru What OS>?
On linux I would do
netstat -anp | grep 3000
on MacOS
lsof -iTCP:3000 | grep LIST
this would show me which process is listening on the port
BuntyBru
@BuntyBru
Mar 21 2018 12:41
MacOS
well i did
"kill all -9 node"
it worked
No more EADDRINUSE 127.0.0.1:3000 error
Stephen James
@sjames1958gm
Mar 21 2018 12:43
@BuntyBru So addr was in use :)
BuntyBru
@BuntyBru
Mar 21 2018 12:44
yes i think so
but i made it sure that it was not in use
anyways

there is one more problem though

everytime i kill my running program

i get this
"[1]+ Killed: 9" in my command line

Though its harmless
Playing with some APIs, trying to make a movie APP
Not much to do in office today
No more "[1]+ Killed: 9" after killing my program
It disappeared
Stephen James
@sjames1958gm
Mar 21 2018 12:48
Probably depends on how you started the program?
BuntyBru
@BuntyBru
Mar 21 2018 12:54
Could be
anyways its not coming now though
Nazar
@IsaakNazar
Mar 21 2018 13:02
@ndburrus thanx a lot :+1:
CamperBot
@camperbot
Mar 21 2018 13:02
isaaknazar sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 2186 | @ndburrus |http://www.freecodecamp.org/ndburrus
Norvin Burrus
@ndburrus
Mar 21 2018 13:04
@IsaakNazar you're welcome! enjoy :sparkles:
Kyle Holm
@thekholm80
Mar 21 2018 13:15
@IsaakNazar did you try out create-react-app?
BuntyBru
@BuntyBru
Mar 21 2018 13:16
Any expressJs guy here>
<%
?
@thekholm80 ??
Kyle Holm
@thekholm80
Mar 21 2018 13:17
@BuntyBru i use express
BuntyBru
@BuntyBru
Mar 21 2018 13:19

so i am making a small movie app
and there i want the image of the movie to be in the webpage

so my code is like this <img src="https://image.tmdb.org/t/p/w500/"<%=e["poster_path"]%>>
but it creates the image address to be like this
<img src="https://image.tmdb.org/t/p/w500/" nbnzadxqjsdt05shlqgt0huc5gm.jpg

rather than "https://image.tmdb.org/t/p/w500/nbnzadxqjsdt05shlqgt0huc5gm.jpg"

how to concatenate the poster_path and the image address
?
@thekholm80
Kyle Holm
@thekholm80
Mar 21 2018 13:20
is that even js? are you using php?
BuntyBru
@BuntyBru
Mar 21 2018 13:21
no man the above is an ejs file which i am rendering
the express issue got solved
this is something else
Kyle Holm
@thekholm80
Mar 21 2018 13:22
yeah i don't recognize what you're trying to do, sorry
BuntyBru
@BuntyBru
Mar 21 2018 13:22
okay man No prob
Fabien SHAN
@X140hu4
Mar 21 2018 14:38
@BuntyBru Have you tried: <img src="https://image.tmdb.org/t/p/w500/<%=e["poster_path"]%>">?
@BuntyBru maybe mixing single and double quotes
Nazar
@IsaakNazar
Mar 21 2018 14:45
@thekholm80 nope, I installed webpack manually. (webpack , webpack dev server)
when I run webpack dev server it takes 3-5 seconds to refresh the page. how long it should take? it seems a little bit longer than I expected
@bibek22 :wave:
Kyle Holm
@thekholm80
Mar 21 2018 14:47
@IsaakNazar it really depends on how powerful your computer is
Nazar
@IsaakNazar
Mar 21 2018 14:49
@thekholm80 the word "powerful" is not related to my laptop :smile:
Kyle Holm
@thekholm80
Mar 21 2018 14:49
lol
think of it as a lesson in patience
Nazar
@IsaakNazar
Mar 21 2018 14:51
@thekholm80 you are optimist :+1:
Darren
@DarrenfJ
Mar 21 2018 16:34
morning fCC...
:wave: @thekholm80
Kyle Holm
@thekholm80
Mar 21 2018 16:35
@DarrenfJ good morning
Darren
@DarrenfJ
Mar 21 2018 16:45
morning buddy.. how goes the code?
Kyle Holm
@thekholm80
Mar 21 2018 16:46
a little frustrating ... yesterday and today have been spent fighting things I thought I had figured out
Darren
@DarrenfJ
Mar 21 2018 16:46
ah yes :D
Kyle Holm
@thekholm80
Mar 21 2018 16:46
today it's socket.io - my first project with it was so simple, now it's being a pain in the butt
Darren
@DarrenfJ
Mar 21 2018 16:47
hey you might be interested in this... i don't have the bandwidth in my life... but you like games and want to program games?
it's like a 2 year group that will train and work together to eventually create a gaming company...
Kyle Holm
@thekholm80
Mar 21 2018 16:48
@DarrenfJ thanks, that's pretty neat
CamperBot
@camperbot
Mar 21 2018 16:48
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2433 | @darrenfj |http://www.freecodecamp.org/darrenfj
Kyle Holm
@thekholm80
Mar 21 2018 16:48
I don't think i have what they're looking for, but it's a cool idea
besides, i'm pretty deep into my ML-blockchain-selfDriving-tinder for dogs app
it's going to be the next <insert successful company here>
Darren
@DarrenfJ
Mar 21 2018 16:50
you have a GitHub for your dog walking app? :P
Kyle Holm
@thekholm80
Mar 21 2018 16:50
haha no
Darren
@DarrenfJ
Mar 21 2018 16:51
I'm excited about her thang but just don't have the time to commit... might ask her if she's into setting up a separate stream of people who want to beta-test and QA stuff...
Kyle Holm
@thekholm80
Mar 21 2018 16:51
it does seem like a pretty big commitment
Darren
@DarrenfJ
Mar 21 2018 16:52
speaking of QA... off to test : /
DarrenfJ @DarrenfJ sneaks off
Kyle Holm
@thekholm80
Mar 21 2018 16:52
break all the things
gishy1
@gishy1
Mar 21 2018 17:42
hi guys
need help withmy image its not responding?
image class
also my twitter icon is not responding
BuntyBru
@BuntyBru
Mar 21 2018 17:48

@X140hu4
yeah i tried it and i was able to do it, thanks to "inspect"
i was actually doing this <img src="https://image.tmdb.org/t/p/w500/<%=e["poster_path"]%>>"

Silly mistake , I know

CamperBot
@camperbot
Mar 21 2018 17:48
buntybru sends brownie points to @x140hu4 :sparkles: :thumbsup: :sparkles:
:cookie: 361 | @x140hu4 |http://www.freecodecamp.org/x140hu4
knight2
@knight2
Mar 21 2018 18:38

Does anyone know how to add path's to SVG file's text/images? The kind that automatically outlines whatever text/images you have, which allows for you to manipulate the file with css (i.e. be able to fill in the color on transition/etc).

Or do you simply need to create an SVG file/logo with photoshop/gimp, save as SVG, and that will automatically have the node path's added ?

Kyle Holm
@thekholm80
Mar 21 2018 18:41
@knight2 i use inkscape to transform images into svg paths
@knight2 maybe this will help?
example to better understand what i'm talking about, I can create a file, but it won't always have those node points added... not sure how to add those
@thekholm80 looks like what i'm talking about
Kyle Holm
@thekholm80
Mar 21 2018 18:43
super
knight2
@knight2
Mar 21 2018 18:43
how difficult is it to get right?
Kyle Holm
@thekholm80
Mar 21 2018 18:43
i managed without any trouble, and i'm dumb as a rock
you'll be fine
knight2
@knight2
Mar 21 2018 18:50
hmm
doesn't do anything when I hit ok for trace bitmap
Kyle Holm
@thekholm80
Mar 21 2018 18:53
i'm trying to remember what my workflow was ... i was ripping off icons to make a clone site, so I started with screenshots. cropped them into Gimp and isolated the icons onto a transparent layer, then pasted that into inkscape
I thin i used trace pixel art to convert to vector, then cleaned that up and exported as svg
then in the browser it's a proper svg
image.png
knight2
@knight2
Mar 21 2018 18:56
yeah
but it isn't adding the paths to the image im giving it
Kyle Holm
@thekholm80
Mar 21 2018 18:57
there are probably better tutorials out there, that was just the first I found
Aditya
@ezioda004
Mar 21 2018 18:59
Wow didnt know there was live sass compiler extension for VSCode, works well with live server
Kyle Holm
@thekholm80
Mar 21 2018 19:00
@ezioda004 someone was talking about that the other day, sounds pretty neat
vscode is pretty cool
Aditya
@ezioda004
Mar 21 2018 19:01
Yes, its the most used text editor according to SO 2018 survey, looks like we converted a lot of people from sublime :laughing:
Kyle Holm
@thekholm80
Mar 21 2018 19:02
i still use Atom for web stuff, but i've been using VSCode for python and loving it
knight2
@knight2
Mar 21 2018 19:02
nah what you have is good
@ezioda004 does it actually work? i hav ebeen trying to configure live compiling fro vscode for past few days no luck
always errors even with following official documentation
Kyle Holm
@thekholm80
Mar 21 2018 19:03
oh lol that's right it was @knight2 that was talking about it lol
knight2
@knight2
Mar 21 2018 19:03
@thekholm80 what i'm trying to do is add path/nodes to a white text and white image, over transperent background
So maybe inkscape can't detect the white image
Aditya
@ezioda004
Mar 21 2018 19:03
@knight2 Weird, I just installed it and didnt configure and its working for me with live server. It auto compiles as soon as I save scss file
knight2
@knight2
Mar 21 2018 19:03
I tested inkscape with colored images, it can do the vectoring just fine
Kyle Holm
@thekholm80
Mar 21 2018 19:03
have you tried breaking it into layers and doing each separately?
knight2
@knight2
Mar 21 2018 19:04
@thekholm80 it won't work with white images for now
maybe if I color the text
then uncolor the text?
Kyle Holm
@thekholm80
Mar 21 2018 19:04
you can set the color in css later
knight2
@knight2
Mar 21 2018 19:04
I want the text to be white so I can change the text with CSS as I please but needs to chnage the image too
Kyle Holm
@thekholm80
Mar 21 2018 19:04
or maybe re-color it before you export
knight2
@knight2
Mar 21 2018 19:04
@ezioda004 Can you describe what you did from installing VScode to that?
some people said there might be an issue with how i have path set up in VSCode, but i literally installed VSCODE fresh, tried to do the auto compile scss tuff, and it never worked
Aditya
@ezioda004
Mar 21 2018 19:07
@knight2 I installed live sass compiler, reloaded vsc. Opened a project file, clicked "go live" and "watch sass" at the bottom of the editor, a console came up saying `watching xyz file", and then any edit and saving the .scss file would auto compile it.
knight2
@knight2
Mar 21 2018 19:12
huh
Aditya
@ezioda004
Mar 21 2018 19:16
Are you trying to configure JSON file to auto compile?
knight2
@knight2
Mar 21 2018 19:18
yeah
i was trying to configure json to auto compile
which didn't work
but re-tried live sass using the go live like you said, and looks like it kind of works.
so that is a good thing
no idea why using json file to auto complile didn't work though
Aditya
@ezioda004
Mar 21 2018 19:19
Yeah I remember reading about that on SO but I skipped it cause it didnt work for me either, Ive been compiling from command line but today found this extension.
knight2
@knight2
Mar 21 2018 19:19
okay good to know i wasn't the only person
i almost just about gave up on using scss
Kyle Holm
@thekholm80
Mar 21 2018 19:20
i love a happy ending
Aditya
@ezioda004
Mar 21 2018 19:20
Lol, sass is so better than css. Never give it up :P
knight2
@knight2
Mar 21 2018 19:21
ehhhhhhhhhhh idon't think it is AMAZING, but certainly a little easier
@thekholm80 lmao I was so frustrated those days
@ezioda004 @thekholm80 thanks both
CamperBot
@camperbot
Mar 21 2018 19:21
knight2 sends brownie points to @ezioda004 and @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1738 | @thekholm80 |http://www.freecodecamp.org/thekholm80
:cookie: 507 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Kyle Holm
@thekholm80
Mar 21 2018 19:22
i really like scss but i've been moving in the other direction lol i'm going back and trying to re-learn bootstrap now because i'm sick of writing css
Aditya
@ezioda004
Mar 21 2018 19:22
I dont fully utilize sass myself either but so far it seems really powerful and its used in industry so might as well use it in workflow.
@thekholm80 I want to dab into a new framwork like materalize/bulma. I've heard good things about them
Kyle Holm
@thekholm80
Mar 21 2018 19:24
i don't want to build front ends at all, i just have a few more to go for fCC projects
i love building back ends, and making front ends work is fun, but design is no fun at all for me
I wish i could outsource all of my UI design
Aditya
@ezioda004
Mar 21 2018 19:26
Ah yes, I hear you. I like to do the logic stuff, not so great at designing part so frameworks like BS makes life easier.
Jesse
@ki4jgt
Mar 21 2018 19:26
@thekholm80 I'm with you on that one. I LOVE programming in Python but when you want a UI for the program. . .
Kyle Holm
@thekholm80
Mar 21 2018 19:26
exactly!
Jesse
@ki4jgt
Mar 21 2018 19:28
I need some front-end experience though -- seeing as that's the first cert I went after. I could be your oursource :wink:
Kyle Holm
@thekholm80
Mar 21 2018 19:28
haha
knight2
@knight2
Mar 21 2018 19:29
@ezioda004 just to be safe.... what do you use for compiling react/babel in vscode?
Kyle Holm
@thekholm80
Mar 21 2018 19:29
we have to write our own code, sadly. it's in the academic honesty thingy we agreed to
Aditya
@ezioda004
Mar 21 2018 19:31
@knight2 Im using boilerplate (still learning React) for now which autocompiles as soon as you hit save.
Yet to start a project of my own.
Kyle Holm
@thekholm80
Mar 21 2018 19:32
wait, are your pages rendering inside of vscode?
Aditya
@ezioda004
Mar 21 2018 19:45
Mine? Nope, is that even possible?
Kyle Holm
@thekholm80
Mar 21 2018 19:45
lol i have no clue
that's why i was confused
Aditya
@ezioda004
Mar 21 2018 19:46
:laughing: I'm sure it'll be a lot of fun when I start from scratch and make a React app
Kyle Holm
@thekholm80
Mar 21 2018 19:48
fun
I don't think that words means what you think it means
Aditya
@ezioda004
Mar 21 2018 19:49
I dropped /s at the end dang it
Kyle Holm
@thekholm80
Mar 21 2018 19:49
lol
i'm just giving you crap
Aditya
@ezioda004
Mar 21 2018 19:52
That crap will come and haunt you with all the npm, babel, webpack questions later :ghost:
Henry
@GitHub-Henry
Mar 21 2018 19:52
@thekholm80 inconceivable
Kyle Holm
@thekholm80
Mar 21 2018 19:53
@GitHub-Henry that's the bunny! lol
@ezioda004 maybe by then i'll have read the change logs for webpack 4 and can actually help you
knight2
@knight2
Mar 21 2018 20:14
@thekholm80 soon you'll have no excuse to not use vscode, once I complete my terrible troubleshooting journey :P
Kyle Holm
@thekholm80
Mar 21 2018 20:26
@knight2 lol i'm pretty committed to Atom for web, it would take something really special to change to VSCode
let me know when you get Operator Mono + ligatures working in VSCode, then I may consider changing
Eric Miller
@ericmiller777
Mar 21 2018 20:31
Any of you guys good with redux?
Kyle Holm
@thekholm80
Mar 21 2018 20:31
i'm familiar, i wouldn't say 'good'
Eric Miller
@ericmiller777
Mar 21 2018 20:32
I have a medium sized project, i need to check if the user state is not null in the login component, I would like to get it in my "App" root component to pass it down so that I could change which compoents are rendered
Kyle Holm
@thekholm80
Mar 21 2018 20:33
so you're thinking of using redux to make that magic happen?
Eric Miller
@ericmiller777
Mar 21 2018 20:33
well if i can get the state from the store
Kyle Holm
@thekholm80
Mar 21 2018 20:33
absolutely
Eric Miller
@ericmiller777
Mar 21 2018 20:33
in my App component
then i can pass it down
I dont want to pass state up, I think thats bad :P
Kyle Holm
@thekholm80
Mar 21 2018 20:34
in redux, there is no 'up' and 'down' there's just 'in the store' and 'not in the store'
Eric Miller
@ericmiller777
Mar 21 2018 20:34
yea
But i got it mostly all set up, I just need to connect the app component
Kyle Holm
@thekholm80
Mar 21 2018 20:35
so your login component will need to call an action, which will send your user state to a reducer which will then store the user state in the store
Eric Miller
@ericmiller777
Mar 21 2018 20:35
yes
in the chrome add on I have
I can see the "user" is in the store
But now how do I read that?
Kyle Holm
@thekholm80
Mar 21 2018 20:36
one sec, i'll show you
Eric Miller
@ericmiller777
Mar 21 2018 20:36
@thekholm80 thanks
CamperBot
@camperbot
Mar 21 2018 20:36
ericmiller777 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1739 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Mar 21 2018 20:37
okay, in any component that you need to access the state, first you need to import { connect } from 'react-redux';
Eric Miller
@ericmiller777
Mar 21 2018 20:38
I have that
Kyle Holm
@thekholm80
Mar 21 2018 20:38
then down at the bottom, outside your component function/class you will need something like
const mapStateToProps = ({ user }) => {
  return { user };
};
Eric Miller
@ericmiller777
Mar 21 2018 20:38
okay
I knew i needed that but I wasnt sure what to pass into it
Kyle Holm
@thekholm80
Mar 21 2018 20:39
then change your export to export default connect(mapStateToProps)(MyComponentNameHere);
Eric Miller
@ericmiller777
Mar 21 2018 20:39
Okay
so i can skip mapdispatchtoprops I thought was neccessary
Kyle Holm
@thekholm80
Mar 21 2018 20:39
then you can access your user state as this.props.user inside the component
yeah
the dispatch is for actions
knight2
@knight2
Mar 21 2018 20:40
@thekholm80 FINALLY GOT IT TO WORK!!!!
Kyle Holm
@thekholm80
Mar 21 2018 20:40
if you have dispatches but no state, you would need to pass null in the place of mapStateToProps in the connect()
@knight2 yay! congrats
knight2
@knight2
Mar 21 2018 20:40
here was the problem
So it was correctly adding objectto path and what not
But the SVG code had also added the color hardlined into the SVg elemetn
So it didn't matter what my css was doing, it had overriding CSS
so I deleted the style: color elements from the svg and now it works great
Kyle Holm
@thekholm80
Mar 21 2018 20:41
oh, yeah that makes sense
knight2
@knight2
Mar 21 2018 20:41
:D
Eric Miller
@ericmiller777
Mar 21 2018 20:41
@thekholm80 thank you
CamperBot
@camperbot
Mar 21 2018 20:41
ericmiller777 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
api offline
Kyle Holm
@thekholm80
Mar 21 2018 20:42
@ericmiller777 did you get it working?
knight2
@knight2
Mar 21 2018 20:42
i wouldn't have noticed if it wasn't for VISUAL STUDIO CODE's color styler
xD
Kyle Holm
@thekholm80
Mar 21 2018 20:42
lol
Eric Miller
@ericmiller777
Mar 21 2018 20:50
@thekholm80 gotta wait for team to clear up errors before I can test :/ I will tell you as soon as I know
Kyle Holm
@thekholm80
Mar 21 2018 20:50
@ericmiller777 haha
i don't know how well i'd be able to work with a team lol
i have 0 patience