Skip to content

Troubleshooting

Stanislav Gurin edited this page Mar 22, 2017 · 3 revisions

Gulp is an expressive, streaming build system which brings a terse, easy to use configuration setup we feel benefits those using front-end build tooling. We enjoy using it for speed and task composability. Although Grunt is a fantastic tool with a rich ecosystem of existing plugins, it comes with a level of (what some deem) over-configuration when it comes to simple tasks. The team working on Web Starter Kit continue to use and love both tools, but felt Gulp would be a better fit for the needs of our users in this particular case.

Errors during installation

npm throws a permissions error unless I use sudo

This is generally caused by permissions issues in your home directory. To reclaim ownership of the .npm directory, open up a terminal window and run sudo chown -R whoami ~/.npm. If this doesn't solve your permissions issues, you may find you also need permissions to write to the node_modules directory. Running sudo chown -R whoami /usr/local/lib/node_modules should address this.

libpng-dev is installed. Command failed: In file included from pngquant.c

During installation if you notice the following message appear in your terminal, your system may have experienced an issue installing some of our image optimization tools:

✗ pre-build test failed, compiling from source...
libpng-dev is installed

{ [Error: Command failed: In file included from pngquant.c:59:
./rwpng.h:35:10: fatal error: 'png.h' file not found
#include "png.h"    /* libpng header; includes zlib.h */
         ^
1 error generated.
make: *** [pngquant.o] Error 1
] killed: false, code: 2, signal: null }

This can usually be solved by going to the terminal and running npm cache clear. Next, re-install the Web Starter Kit tooling by running sudo npm install inside the root directory of the download (e.g /web-starter-kit). If you find that this doesn't solve the error and you are a Mac user, try installing Homebrew - a package manager for OSX, and then run brew install libpng.