I’m going through the SAFE Web App Tutorial and getting stuck with errors on “npm install” step. I’m running on Ubuntu 18.04.1, node 8.11.1. Here are the error’s I’m getting - any ideas how to get around these?
tom@tom-ubuntu:~/Documents/Projects/safe_examples/safe_web_app_quick_start$ npm install
> nodent-runtime@3.2.1 install /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/nodent-runtime
> node build.js
## Built /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/nodent-runtime/dist/index.js
> uglifyjs-webpack-plugin@0.4.6 postinstall /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> cwebp-bin@4.0.0 postinstall /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/cwebp-bin
> node lib/install.js
✔ cwebp pre-build test passed successfully
> gifsicle@3.0.4 postinstall /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/gifsicle
> node lib/install.js
✔ gifsicle pre-build test passed successfully
> mozjpeg@4.1.1 postinstall /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg
> node lib/install.js
⚠ The `/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix="/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor" --bindir="/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor" --libdir="/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor" && make --jobs=8 && make install --jobs=8
Command failed: autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:22: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
> pngquant-bin@4.0.0 postinstall /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/pngquant-bin
> node lib/install.js
⚠ The `/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN safe_web_app_quick_start@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall 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! /home/tom/.npm/_logs/2018-09-09T14_58_58_177Z-debug.log
And what happens if you delete the node_modules directory and do npm install again. It looks like something might be corrupted, but that’s just a guess.
So I there must be something different on your system (I doubt it’s the node version, but maybe worth trying if you are desperate!), but beyond that I don’t know, sorry.
Installing build-essencial resolved the second png error, but I’m still seeing the first one:
sudo apt-get install build-essential
> mozjpeg@4.1.1 postinstall /home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg
> node lib/install.js
⚠ The `/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix="/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor" --bindir="/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor" --libdir="/home/tom/Documents/Projects/safe_examples/safe_web_app_quick_start/node_modules/mozjpeg/vendor" && make --jobs=8 && make install --jobs=8
Command failed: autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:22: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)