Tag Archives: BabelJS

Do not use minification.constantFolding when using Babel on Heroku

I had a hard time debugging why my app on Heroku doesn’t work. It’s being run with babel-node. I encountered EACCES errors without any explanation of what’s going on. So apparently my port has not been changing. Apparently minification.constantFolding folds process.env. as constants. What I’m baffled about is that babel-node does not capture the value of process.env at the time it’s called, even though it should be at that time.

Anyway, for everybody’s guidance.