These are chat archives for geelen/jspm-server

20th
Oct 2015
Fust Kilas
@fustkilas
Oct 20 2015 06:57
hi everyone, my jspm-server is reloadig the whole page, not hot-relaoding... is this a new fenomeno
Jiri Spac
@capaj
Oct 20 2015 08:01
@evilkrow no, it was doing that for me as well ever since I have been trying it
@evilkrow shameless plug-there is a much better solution for reloading your React apps with JSPM-https://github.com/capaj/jspm-hot-reloader
@evilkrow I even have boilerplate for react ready: https://github.com/capaj/jspm-react
@evilkrow just clone and start developing, no need for plugins, just raw babel, enjoly
Fust Kilas
@fustkilas
Oct 20 2015 13:18
@capaj how come i dont see any config.js? or a jspm_packages folder?
Jiri Spac
@capaj
Oct 20 2015 14:07
@evilkrow because they are ignored, you are supposed to create them after you clone with jspm i
Fust Kilas
@fustkilas
Oct 20 2015 14:07
@capaj i am trying to run your jspm-react repo
i have cloned it, now i do npm install
Jiri Spac
@capaj
Oct 20 2015 14:08
yeah, that is how you should do it
Fust Kilas
@fustkilas
Oct 20 2015 14:08
but i am getting error
should i do npm i first and then jspm i or vice versa?
does it not matter
Jiri Spac
@capaj
Oct 20 2015 14:09
it does not matter
but since I have an npm postinstall
it should be enough to just do npm i
so clone, npm i and npm start
and you should be good to go
Fust Kilas
@fustkilas
Oct 20 2015 14:09
hang on let me tell you the error
thats what i get when i run npm start
why?
Jiri Spac
@capaj
Oct 20 2015 14:14
@evilkrow it requires node of version 4 at least
Fust Kilas
@fustkilas
Oct 20 2015 14:14
oh, how do i upgrade
if you're on mac/linux it might be better to use nvm: https://github.com/creationix/nvm
Peter Müller
@Munter
Oct 20 2015 14:17
always use nvm
Fust Kilas
@fustkilas
Oct 20 2015 14:18
should i use nvm or n?
Jiri Spac
@capaj
Oct 20 2015 14:19
@Munter unless you're on windows :worried:
@evilkrow use nvm if you can :D
Fust Kilas
@fustkilas
Oct 20 2015 14:20
i used n
capaj, it seems to work now!
Jiri Spac
@capaj
Oct 20 2015 14:20
@evilkrow awesome!
first load will be slow as you wrote-7-8 seconds, any change should be rendered in few miliseconds
Fust Kilas
@fustkilas
Oct 20 2015 14:21
yeah, not happening...
i'm editing home.js and nothing happening...
Jiri Spac
@capaj
Oct 20 2015 14:23
maybe you're running into issues with https://github.com/paulmillr/chokidar
do you even see logs in the console?
Fust Kilas
@fustkilas
Oct 20 2015 14:23
what issues could those be?
console log shows no error
Jiri Spac
@capaj
Oct 20 2015 14:23
in the console where you ran npm start
Fust Kilas
@fustkilas
Oct 20 2015 14:24
yup, no error
using baseURL from package.json: public
connected
File routes/home.js emitted: change
connected
connected
File routes/home.js emitted: change
connected
Jiri Spac
@capaj
Oct 20 2015 14:25
oh yeah
Fust Kilas
@fustkilas
Oct 20 2015 14:25
? so nothing is wrong, but i dont see changes!
even after manually refreshing!
do i have to run something else?
Jiri Spac
@capaj
Oct 20 2015 14:26
no, don't manually refresh
no, you shouldn't do anything else
in your browser, are you on localhost
oooh you probably are on 127.0.0.1
or not?
Fust Kilas
@fustkilas
Oct 20 2015 14:27
Jiri Spac
@capaj
Oct 20 2015 14:27
yeah
Fust Kilas
@fustkilas
Oct 20 2015 14:27
why is it adding junk to the end of the urk
url
Jiri Spac
@capaj
Oct 20 2015 14:27
thats rect router
Jiri Spac
@capaj
Oct 20 2015 14:27
react router
I hate that too
Fust Kilas
@fustkilas
Oct 20 2015 14:28
ok so what do i do to hotreload?
Jiri Spac
@capaj
Oct 20 2015 14:28
just change <h2>Home route</h2> to <h2>Home route changed</h2>
for exmple
that should do it
and save the file
@evilkrow did it work?
Fust Kilas
@fustkilas
Oct 20 2015 14:29
nope
no changes
Jiri Spac
@capaj
Oct 20 2015 14:30
in the console, you should have: reimported http://localhost:9080/app.js jspm-hot-reloader.js:76 deleted a module http://localhost:9080/routes/home.js jspm-hot-reloader.js:76 deleted a module http://localhost:9080/app.js
in the browser console
do you?
Fust Kilas
@fustkilas
Oct 20 2015 14:32
nope
Jiri Spac
@capaj
Oct 20 2015 14:33
that's weird-which version of jspm do you run?
in your command line if you do jspm -v
or any other errors in the console? There shouldn't be any...
the console I mean the one in the browser
Fust Kilas
@fustkilas
Oct 20 2015 14:36
oh
browser console
0.16.11
no errors in either console
Jiri Spac
@capaj
Oct 20 2015 14:41
hmm that should work. I have tested it with 0.16.12, but 0.16.11 should be fine
@evilkrow which browser? chrome?
Fust Kilas
@fustkilas
Oct 20 2015 14:42
now upgraded to .16.13, no changes happening
Jiri Spac
@capaj
Oct 20 2015 14:43
@evilkrow I just tried in firefox and there the hot reload doesn't work
Fust Kilas
@fustkilas
Oct 20 2015 14:44
i'm chromium
even manual refresh doesnt work
Fust Kilas
@fustkilas
Oct 20 2015 14:52
everything is just supposed to work with jspm, and now here is all this extra config
Jiri Spac
@capaj
Oct 20 2015 16:18
@evilkrow do you have Disable cache (while DevTools is open) checked in your browser?
Fust Kilas
@fustkilas
Oct 20 2015 16:35
no i dont
so i did select "disable cache". hotreloading only happens ig dev tools is open and cache is dabled! this is so clumsy...why is this happening?
Jiri Spac
@capaj
Oct 20 2015 17:55
@evilkrow I think it has to do with http-server that I used to serve the content. Will definately look into replacing it so that it works even without openeing dev tools
Jiri Spac
@capaj
Oct 20 2015 19:36
@evilkrow I have turned of caching on the http-server capaj/jspm-react@9b580b4 so hopefully no one will get the issues you had. Thanks for alerting me.