Docker container fails due to npm error #831

Closed
opened 2020-01-31 18:54:39 +01:00 by michaeltintiuc · 0 comments
michaeltintiuc commented 2020-01-31 18:54:39 +01:00 (Migrated from github.com)

The Issue

Steps to reproduce

  1. Clone lbry-android repo
  2. Follow DOCKER-DEV.md instructions
  3. Run lbry-android docker-build
  4. npm install -g ... errors out

Expected behaviour

Container should be created successfully

Actual behaviour

npm throws error:

npm ERR! Linux 5.3.0-7625-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "yarn" "react-native-cli"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG
...
The command '/bin/sh -c dpkg --add-architecture i386 &&     apt-get -y update &&     apt-get install -y       curl ca-certificates software-properties-common gpg-agent wget       python3.7 python3.7-dev python3-pip python2.7 python2.7-dev python3.7-venv       python-pip zlib1g-dev m4 zlib1g:i386 libc6-dev-i386 gawk nodejs npm unzip openjdk-8-jdk       autoconf autogen automake libtool libffi-dev build-essential       ccache git libncurses5:i386 libstdc++6:i386       libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 &&     npm install -g yarn react-native-cli &&     pip2 install --upgrade cython setuptools &&     pip2 install git+https://github.com/lbryio/buildozer.git@master &&     ln -s /src/scripts/build-docker.sh /usr/local/bin/build &&     adduser lbry-android --gecos GECOS --shell /bin/bash --disabled-password --home /home/lbry-android &&     mkdir /home/lbry-android/.npm-packages &&     echo "prefix=/home/lbry-android/.npm-packages" > /home/lbry-android/.npmrc &&     chown -R lbry-android:lbry-android /home/lbry-android &&     mkdir /src &&     chown lbry-android:lbry-android /src &&     mkdir /dist &&     chown lbry-android:lbry-android /dist' returned a non-zero code: 1

System Configuration

  • Device: Docker
  • Android version: N/A

Anything Else

Seems like the older 3.5.2 npm version to causing this as per: https://github.com/npm/cli/issues/681
Updating to latest npm fixes it.

Screenshots

Internal Use

Acceptance Criteria

Definition of Done

  • Tested against acceptance criteria
  • Tested against the assumptions of the user story
  • The project builds without errors
  • Unit tests are written and passing
  • Tests on devices/browsers listed in the issue have passed
  • QA performed & issues resolved
  • Refactoring completed
  • Any configuration or build changes documented
  • Documentation updated
  • Peer Code Review performed
<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. We are also available on live chat at https://chat.lbry.com --> ## The Issue ### Steps to reproduce 1. Clone `lbry-android` repo 2. Follow `DOCKER-DEV.md` instructions 3. Run `lbry-android docker-build` 4. `npm install -g ...` errors out ### Expected behaviour Container should be created successfully ### Actual behaviour `npm` throws error: ``` npm ERR! Linux 5.3.0-7625-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "yarn" "react-native-cli" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code EMISSINGARG ... The command '/bin/sh -c dpkg --add-architecture i386 && apt-get -y update && apt-get install -y curl ca-certificates software-properties-common gpg-agent wget python3.7 python3.7-dev python3-pip python2.7 python2.7-dev python3.7-venv python-pip zlib1g-dev m4 zlib1g:i386 libc6-dev-i386 gawk nodejs npm unzip openjdk-8-jdk autoconf autogen automake libtool libffi-dev build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 && npm install -g yarn react-native-cli && pip2 install --upgrade cython setuptools && pip2 install git+https://github.com/lbryio/buildozer.git@master && ln -s /src/scripts/build-docker.sh /usr/local/bin/build && adduser lbry-android --gecos GECOS --shell /bin/bash --disabled-password --home /home/lbry-android && mkdir /home/lbry-android/.npm-packages && echo "prefix=/home/lbry-android/.npm-packages" > /home/lbry-android/.npmrc && chown -R lbry-android:lbry-android /home/lbry-android && mkdir /src && chown lbry-android:lbry-android /src && mkdir /dist && chown lbry-android:lbry-android /dist' returned a non-zero code: 1 ``` ## System Configuration - Device: Docker - Android version: N/A ## Anything Else Seems like the older 3.5.2 npm version to causing this as per: https://github.com/npm/cli/issues/681 Updating to latest npm fixes it. ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here --> ## Internal Use ### Acceptance Criteria 1. 2. 3. ### Definition of Done - [ ] Tested against acceptance criteria - [ ] Tested against the assumptions of the user story - [ ] The project builds without errors - [ ] Unit tests are written and passing - [ ] Tests on devices/browsers listed in the issue have passed - [ ] QA performed & issues resolved - [ ] Refactoring completed - [ ] Any configuration or build changes documented - [ ] Documentation updated - [ ] Peer Code Review performed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LBRYCommunity/lbry-android#831
No description provided.