docker-cartodb icon indicating copy to clipboard operation
docker-cartodb copied to clipboard

Step 27/59 npm install freezes

Open bplmp opened this issue 7 years ago • 5 comments

Running on Ubuntu 16.04, the build freezes on the npm install of step 27.

#SQL API
RUN git clone git://github.com/CartoDB/CartoDB-SQL-API.git &&\
cd CartoDB-SQL-API &&\
git checkout master &&\
npm install

Cloning the repo manually and running npm install, outside of Docker, works fine.

Running npm install -dd for verbose output, it freezes on:

npm info retry fetch attempt 1 at 1:17:13 PM
npm info attempt registry request try #1 at 1:17:13 PM
npm http fetch GET https://registry.npmjs.org/underscore/-/underscore-1.8.2.tgz
npm info retry fetch attempt 1 at 1:17:13 PM
npm info attempt registry request try #1 at 1:17:13 PM
npm http fetch GET https://registry.npmjs.org/semver/-/semver-4.3.6.tgz
npm http fetch 200 https://registry.npmjs.org/underscore/-/underscore-1.8.2.tgz
npm http fetch 200 https://registry.npmjs.org/semver/-/semver-4.3.6.tgz
npm verb addTmpTarball /tmp/npm-9-0db98014/registry.npmjs.org/underscore/-/underscore-1.8.2.tgz not in flight; adding
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb addTmpTarball validating metadata from /tmp/npm-9-0db98014/registry.npmjs.org/underscore/-/underscore-1.8.2.tgz
npm verb tar unpack /tmp/npm-9-0db98014/registry.npmjs.org/underscore/-/underscore-1.8.2.tgz
npm verb tar unpacking to /tmp/npm-9-0db98014/unpack-671fed84
npm verb gentlyRm don't care about contents; nuking /tmp/npm-9-0db98014/unpack-671fed84
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb afterAdd /root/.npm/underscore/1.8.2/package/package.json not in flight; writing
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb afterAdd /root/.npm/underscore/1.8.2/package/package.json written
npm verb addTmpTarball /tmp/npm-9-0db98014/registry.npmjs.org/semver/-/semver-4.3.6.tgz not in flight; adding
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb addTmpTarball validating metadata from /tmp/npm-9-0db98014/registry.npmjs.org/semver/-/semver-4.3.6.tgz
npm verb tar unpack /tmp/npm-9-0db98014/registry.npmjs.org/semver/-/semver-4.3.6.tgz
npm verb tar unpacking to /tmp/npm-9-0db98014/unpack-ec862f76
npm verb gentlyRm don't care about contents; nuking /tmp/npm-9-0db98014/unpack-ec862f76
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb afterAdd /root/.npm/semver/4.3.6/package/package.json not in flight; writing
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb afterAdd /root/.npm/semver/4.3.6/package/package.json written

bplmp avatar Apr 01 '18 13:04 bplmp

I was trying this locally on my computer. Running it on a Digital Ocean Droplet created from scratch works fine, so this is probably related to some issue with my local installation of node or npm.

However, on the Droplet, it fails on step 28:

npm ERR! Linux 4.4.0-109-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! path /Windshaft-cartodb/node_modules/.staging/abbrev-f8736d52
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/Windshaft-cartodb/node_modules/.staging/abbrev-f8736d52' -> '/Windshaft-cartodb/node_modules/@carto/mapnik/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/Windshaft-cartodb/node_modules/.staging/abbrev-f8736d52' -> '/Windshaft-cartodb/node_modules/@carto/mapnik/node_modules/abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /Windshaft-cartodb/npm-debug.log
The command '/bin/sh -c git clone git://github.com/CartoDB/Windshaft-cartodb.git &&cd Windshaft-cartodb &&git checkout master &&npm install' returned a non-zero code: 254

bplmp avatar Apr 03 '18 18:04 bplmp

It needs an amount of RAM available and CPU to install and work correctly.

marcolucioed1 avatar Apr 03 '18 19:04 marcolucioed1

Same problem here

antoniovj1 avatar May 11 '18 14:05 antoniovj1

Same problem for me.

My laptop has an Intel Core i7-7700K, 32GB of RAM and a NVIDIA GeForce GTX 1080 (GP104M), so forget about the problem being machine specs.

If you're patient enough though, the install should still go through. It did in my case, even though it took around 5 minutes. It usually completes in under a minute.

WayneRiesterer avatar May 26 '18 13:05 WayneRiesterer

change windshat with this npm install -g [email protected] && yarn install

stockhausen avatar Jun 28 '18 12:06 stockhausen