Q:

Angular-fullstack generator production app does not properly serve socket.io? 

I am running into trouble between two angular-fullstack apps deployed on AWS via same setup and configuration. 
It seems that socket.io-client/socket.io.js isn't served properly on one of them despite having same settings. 
Seems like it's getting an error 400 (bad request) when trying to get socket.io.js and in turn, it's getting an "io not defined". 
I've narrowed it down to this piece of code:
var socketio = require('socket.io')(server, {
  serveClient: (config.env === 'production') ?  false : true,
  path: '/socket.io-client'
});

Seems like if I set serveClient to always be true, it will work because it's always serving to the client. 
If this is the case, why do so many resources online set serveClient to false for production?  It works for one app but not the other. 
EDIT: just deployed on AWS with serveClient: true.  Doesn't work.  But apparently it works on my local. 
EDIT 2: did an npm install for the working app, now it's broken so maybe something is broken with packages. 
EDIT 3: did a test on NODE_ENV=production after a grunt build:dist and same issue so it should be issue with one of the packages. 

A:

Turns out angular-fullstack's built in grunt file will grab all dependencies in bower.json (via wiredep), which includes google-code-prettify/bin/prettify.min.js since I've installed it. 
The minification process is somehow incompatible with the already minified prettify.min.js (never actually had this issue before with other minified files). 
So I had to include a regex in the wiredep.target.exclude property to exclude google-code-prettyify/**/.js files and manually include the non-minified /src/prettify.js file. 
I had a feeling the google-code-prettify package was causing problems because I remember JSHint complaining about it before. 
Hopefully this brings awareness that npm packages can be broken in some intermittent way.