Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose build fails #1

Open
james2432 opened this issue Mar 10, 2020 · 2 comments
Open

docker-compose build fails #1

james2432 opened this issue Mar 10, 2020 · 2 comments
Assignees

Comments

@james2432
Copy link
Contributor

`
Step 8/12 : RUN npm install --only=production
---> Running in bae8414c2ba3

sqlite3@3.1.13 install /src/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v79-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@13.10.1 (node-v79 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v79-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@13.10.1 (node-v79 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/src/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
make: Entering directory '/src/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-6/README.Bugs for instructions.
make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o] Error 4
deps/sqlite3.target.mk:139: recipe for target 'Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o' failed
make: Leaving directory '/src/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:316:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.15.0-39-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/src/node_modules/sqlite3/lib/binding/node-v79-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/src/node_modules/sqlite3/lib/binding/node-v79-linux-x64"
gyp ERR! cwd /src/node_modules/sqlite3
gyp ERR! node -v v13.10.1
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/src/node_modules/sqlite3/lib/binding/node-v79-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/src/node_modules/sqlite3/lib/binding/node-v79-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/src/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:316:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1026:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.15.0-39-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/src/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /src/node_modules/sqlite3
node-pre-gyp ERR! node -v v13.10.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/src/node_modules/sqlite3/lib/binding/node-v79-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/src/node_modules/sqlite3/lib/binding/node-v79-linux-x64' (1)
npm WARN micro-data-service@0.5.0 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@3.1.13 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.13 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/2020-03-10T01_53_06_740Z-debug.log
ERROR: Service 'web' failed to build: The command '/bin/sh -c npm install --only=production' returned a non-zero code: 1

`

@DenisCarriere
Copy link
Member

You will need need to use an older version of NodeJS since SQLite library hasn't been updated in a while.

I've updated the Dockerfile to node:8

Also added pm2 (similar to Docker)

Install

  • npm install -g pm2
  • pm2 install typescript

Start pm2

  • pm2 start

@DenisCarriere
Copy link
Member

Try using pm2 with NodeJS 8

I can't get Docker to work at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants