npm install error - Wiki installation step #5 OTM tiler

22 views
Skip to first unread message

seitam

unread,
Sep 15, 2017, 9:59:10 PM9/15/17
to opentreemap-user
Hello guys, 

First of all thank you for sharing such amazing project, I really appreciate your work. 
I would like to test a OTM Production server using a AWS-Free Tier (Running on 1CPU 1GB of RAM, 30GB of SSD, Ubuntu Server 14.04.05 LTS).

I have followed the Wiki Installation steps although I faced some problems that I had to bypass (basically using this Google group & Google searches). My intention is to share with the community the installation process if eventually I get a production OTM instance running.

I would like to clarify the installation changes that I've applied just in case they may have any impact with the hurdle I found in the step number 5.

# Steps 1-2: No problems to report
# Step number 3: Installing Django and OTM Django Apps

- Error when issuing: "pip install -r requirements.txt"
How I've solve it: "sudo pip instal -U pip", "pip2 install -r requirements.txt"

- Error again when issuing: "pip install -r requirements.txt" (strict mode error)
How I've solve it: 

#apt-get install -yq npm
npm install -g nave
NODE_VERSION_FOR_WEBPACK=4.8.0
nave usemain $NODE_VERSION_FOR_WEBPACK

- Error when running "npm run build" (missing binding)
How to solve it:

"cd /usr/local/otm/app/node_modules
rm -R node-sass
npm install"

- Error when running the following line, there is a typo, change to "clear" not "clean"

"python opentreemap/manage.py collectstatic --noinput --clean"

# 4: Install the OTM ecoservice: I've found no problems in this step. 

# 5 : Install the OTM tiler

- Error While running "npm install":


npm ERR! hir...@0.1.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hir...@0.1.17 install script.
npm ERR! This is most likely a problem with the hiredis package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls hiredis
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-125-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /usr/local/tiler
npm ERR! node -v v4.8.0
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
 

On this forum I found some interesting pots regarding the OTM tiler npm installation: https://groups.google.com/d/msg/opentreemap-user/Q9DQG2lx4-c/6j4FMrywAwAJ
I've tried to upgrade and downgrade npm unsuccessfully. 
At the moment I've have the following error output: https://pastebin.com/XKMb3r5J

Could anybody shed any light on this issue?

Thank you very much, 

Best regards.


seitam

unread,
Sep 17, 2017, 4:38:35 AM9/17/17
to opentreemap-user
My bad! I didn't noticed that the problem resided on memory shortage! (as the user https://groups.google.com/d/msg/opentreemap-user/neb1DJX2nr0/Uil_ZBRrBgAJ answered creating a SWAP space should do the trick) - and IT DID!

A SWAP with 4GB of memory solved the issue:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=4024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1

Sorry for the Spam.

Regards,
Reply all
Reply to author
Forward
0 new messages