Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-297

Docker image build fails



    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Site Backend
    • Labels:


      Trying to build the image using the website repo Dockerfile with the output printed below.
      The issue is due to conflicting python versions.

      Instructions on https://github.com/brianc/node-pg-native/issues/9 did not fix the issue nor installing the libpq-dev package



      Step 15/23 : RUN npm install
      ---> Running in 1bf3b3b53ba0

      > libpq@1.8.8 install /home/bookbrainz/bookbrainz-site/node_modules/libpq
      > node-gyp rebuild

      Traceback (most recent call last):
      File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 13, in <module>
      import gyp
      File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/_init_.py", line 8, in <module>
      import gyp.input
      File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in <module>
      from compiler.ast import Const
      ImportError: No module named compiler.ast
      gyp ERR! configure error
      gyp ERR! stack Error: `gyp` failed with exit code: 1
      gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
      gyp ERR! stack at emitTwo (events.js:126:13)
      gyp ERR! stack at ChildProcess.emit (events.js:214:7)
      gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
      gyp ERR! System Linux 4.9.93-linuxkit-aufs
      gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
      gyp ERR! cwd /home/bookbrainz/bookbrainz-site/node_modules/libpq
      gyp ERR! node -v v8.12.0
      gyp ERR! node-gyp -v v3.8.0
      gyp ERR! not ok
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! libpq@1.8.8 install: `node-gyp rebuild`
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the libpq@1.8.8 install script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

      npm ERR! A complete log of this run can be found in:
      npm ERR! /root/.npm/_logs/2018-10-08T18_18_35_991Z-debug.log
      The command '/bin/sh -c npm install' returned a non-zero code: 1





            • Assignee:
              mr_monkey Monkey
              mr_monkey Monkey
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:


                Version Package