Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Fix yarn failure to install (package.json lookup)
Browse files Browse the repository at this point in the history
yarn failed to install and thus failed to install gateway dependencies,
to we relocate it to let it find gateway's package.json file.

Observed (silent) issue on docker 17.12.1-ce (Ubuntu-18.04) on x86_64:

    npm WARN saveError ENOENT: no such file or directory, open '/home/node/package.json'
    (...)
    + yarn@1.9.4
    added 1 package in 0.447s
    Cloning into 'intent-parser'...
    Cloning into 'gateway'...
    yarn install v1.9.4
    [1/4] Resolving packages...
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info fsevents@1.2.4: The platform "linux" is incompatible with this module.
    (...)
    [3/4] Linking dependencies...
    [4/4] Building fresh packages...

Change-Id: I8737dfc28da8c8bf266de829725f3c09f62d9468
Signed-off-by: Philippe Coval <p.coval@samsung.com>
  • Loading branch information
rzr committed Aug 10, 2018
1 parent caeddc9 commit 2384de7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/s
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER node
RUN cd /home/node && \
npm install yarn && \
WORKDIR /home/node
RUN set -x && \
mkdir mozilla-iot && \
cd mozilla-iot && \
git clone https://github.com/mozilla-iot/intent-parser && \
git clone https://github.com/mozilla-iot/gateway && \
cd gateway && \
/home/node/node_modules/.bin/yarn
npm install yarn && \
yarn

USER root
ADD service /etc/service
Expand Down

0 comments on commit 2384de7

Please sign in to comment.