Rahul Doshi edited this page Jun 25, 2014 · 7 revisions

The following guide documents workarounds to issues some users may experience during installation or running of the Web Starter Kit tools. If you find that your error is not documented below, please open up an issue and we will be happy to discuss how it can be solved.

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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.