GlobalFishingWatch / pelagos-client

Documentation
http://globalfishingwatch.io/pelagos-client/
Other
7 stars 4 forks source link

Quick start guide is broken #438

Open timrobertson100 opened 7 years ago

timrobertson100 commented 7 years ago

I'm afraid the quick start from the readme fails as Git and NodeJs are not installed. However, even when installed the build fails with the following:

touch js/libs/easyXDM/easyXDM.min.js
ui_tests/server.py
Traceback (most recent call last):
  File "ui_tests/server.py", line 3, in <module>
    import click
ImportError: No module named click
make: *** [dev-server] Error 1
vagrant@vagrant-ubuntu-precise-64:/vagrant$ 
timrobertson100 commented 7 years ago

Here is what worked for me (disclosure: I am not a python guy) to get the server running, but the app still fails in the browser:

  vagrant up
  vagrant ssh
  sudo apt-get -y install git
  sudo apt-get -y install nodejs
  sudo apt-get -y install python-setuptools python-dev build-essential python-pip
  sudo pip install click
  sudo pip install selenium
  sudo pip install vectortile

The browser will fail to pull the apikeys.json however: jquery.js:8630 GET http://localhost:8000/apikeys.json 404 (File not found)

timrobertson100 commented 7 years ago

You can get past that issue by visiting the Google site to get a maps key and then:

vagrant@vagrant-ubuntu-precise-64:/vagrant$ mv apikeys.json.template apikeys.json
vagrant@vagrant-ubuntu-precise-64:/vagrant$ vi apikeys.json 
-- edit this file and put your key in and save it

You also need to edit some config files:

vagrant@vagrant-ubuntu-precise-64:/vagrant$  cp defaultConfig.json config.json
vagrant@vagrant-ubuntu-precise-64:/vagrant$  mv style.less.template  style.less

This will get a base map and the controls running, but seemingly no overlays...

enriquetuya commented 7 years ago

@timrobertson100 the issue seems to be related to vagrant not running the make prerequisites, you will see that the prerequisites step does everything you have done manually, check: https://github.com/GlobalFishingWatch/pelagos-client/blob/09fa86616786759eb01a0ccf072605e6986ac7d8/Vagrantfile#L10 and https://github.com/GlobalFishingWatch/pelagos-client/blob/09fa86616786759eb01a0ccf072605e6986ac7d8/Makefile#L56

I've just run vagrant up and everything (except for modifying the .template files) worked for me. So this may be an issue with the version of vagrant and virtualbox you have installed. Which versions do you have? I'm using vagrant 1.9.3 and virtualbox 5.1.1

Besides that this project is sort of deprecated, we have moved to a new map last week (https://github.com/Vizzuality/GlobalFishingWatch), we will be using this map for debuggin purposes since it is more generic than the new map.

If you want and if you have an spare minutes please add the missing steps on the README (api.keys.json.template and style.less.template).

timrobertson100 commented 7 years ago

Thanks Enrique.
This was vagrant 1.8.1 and Virtualbox 4.3 - I'll report back when I get a chance to upgrade and try this again.