iDigBio / idigbio-search-api

Server-side code driving iDigBio's search functionality.
GNU General Public License v3.0
24 stars 5 forks source link

Build of master fails on travis-ci.com after migration. #54

Closed roncanepa closed 3 years ago

roncanepa commented 3 years ago
[2/4] Fetching packages...

info fsevents@1.2.13: The platform "linux" is incompatible with this module.

info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.

error cli-table@0.3.4: The engine "node" is incompatible with this module. Expected version ">= 10.0.0". Got "6.17.1"

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

error Found incompatible module.

yarn cache v1.22.10

success Cleared cache.

Done in 2.83s.

Removing intermediate container 0686a5eb9b8e

 ---> fb8e5c237b65

Step 11/14 : ADD . /var/www

 ---> 3c86a7da58f8

Step 12/14 : RUN yarn build

 ---> Running in ef3aa7097a05

yarn run v1.22.10

$ npm run clean; babel -d ./build ./src/

> idb-search-api@1.0.12 clean /var/www

> rm -rf build/

/bin/sh: 1: babel: not found

error Command failed with exit code 127.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The command '/bin/sh -c yarn build' returned a non-zero code: 127

The command "docker build -t $BUILDING ." failed and exited with 127 during .

Your build has been stopped.
roncanepa commented 3 years ago

There were multiple trails in trying to figure out this issue. In addition to the above, there was also this:

Step 5/14 : RUN npm install -g yarn

 ---> Running in a3b90f119c73

npm WARN lifecycle yarn@1.22.10~preinstall: cannot run in wd %s %s (wd=%s) yarn@1.22.10 :; (node ./preinstall.js > /dev/null 2>&1 || true) /usr/lib/node_modules/.staging/yarn-c6781dde

/usr/bin/yarn -> /usr/lib/node_modules/yarn/bin/yarn.js

/usr/bin/yarnpkg -> /usr/lib/node_modules/yarn/bin/yarn.js

/usr/lib

`-- yarn@1.22.10 

which seems to be sometimes due to permissions. Most of the issues could be replicated in a 18.04 vm.

The ultimate fix was placing npm install later in the docker build process ( 17c0d6e )