I have been facing an issue while trying to deploy my angular 4 app on Heroku. The deployment fails to proceed properly even though everything works fine locally.
Here are the relevant files:
package.json
{
"name": "webcli2",
"version": "0.0.0",
"license": "MIT",
"main": "app.js",
...
}
app.js
const express = require('express');
...
console.log('console listening');
Procfile web: npm start
About the error encountered, here is a snippet:
remote: @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b2824263b22272e39662827220b7f657f657d">[email protected]</a> requires typescript@'>=2.1.0 <2.4.0' but 2.6.1 was found instead.
...
remote: -----> Build failed
It appears that Heroku has TypeScript version 2.6.1 whereas the package specifies version 2.3.3. Is this causing the errors?
Locally I see:
Brunos-MBP:webcli brunolopes$ ng build -aot
12% building modules 18/18 modules 0 activeWarning: Can't resolve all
parameters for ApplicationError in ...
Date: 2017-11-16T07:51:16.467Z
Hash: 32f3a3b7f72daf78e799
...
Thank you
B