Im using autoprefixer with postcss and after moving to a new linux server something must be wrong but I cant figure out what this one could be. I'm getting the error:
/home/ec2-user/Enviziion/Muveoo/Server/node_modules/postcss/lib/lazy-result.js:157
this.processing = new Promise(function (resolve, reject) {
^
ReferenceError: Promise is not defined
Which is triggered by:
var autoprefixer = require('autoprefixer');
var postCSS = require('postcss');
function prefix(css, res, type, fullPath) {
postCSS([autoprefixer]).process(css).then(function(result) {
var css = result.css;
var length = css.length;
res.writeHead(200, {
'Content-Length' : length,
'Content-Type' : type
});
res.write(css);
res.end();
});
}
I researched this problem but all of the occurrences of the issue seem to be for extremely early versions of node.js, for example:
Native Support for Promises in Node.js
https://github.com/postcss/postcss-nested/issues/30
And the solution always seems to be "Update Node".
But mine seems to be up to date:
[ec2-user@ip-172-31-22-79 Server]$ node -v
v5.7.0
What might my issue be here?