Heroku Deployment Failing
See original GitHub issueVersions.
ng -versions gives:
angular-cli: 1.0.0-beta.26 node: 7.4.0 os: darwin x64 @angular/common: 2.4.5 @angular/compiler: 2.4.5 @angular/core: 2.4.5 @angular/forms: 2.4.5 @angular/http: 2.4.5 @angular/platform-browser: 2.4.5 @angular/platform-browser-dynamic: 2.4.5 @angular/router: 3.4.5 @angular/compiler-cli: 2.4.5
Repro steps.
The app was created using AngularCLI and no changes have been made to the configurations.
The log given by the failure.
Heroku CLI log: ``` 2017-02-08T17:39:26.526391+00:00 app[web.1]: > angular-app@0.0.0 start /app 2017-02-08T17:39:26.526392+00:00 app[web.1]: > ng serve 2017-02-08T17:39:26.526393+00:00 app[web.1]: 2017-02-08T17:39:26.846206+00:00 app[web.1]: As a forewarning, we are moving the CLI npm package to “@angular/cli” with the next release, 2017-02-08T17:39:26.846219+00:00 app[web.1]: which will only support Node 6.9 and greater. This package will be officially deprecated 2017-02-08T17:39:26.846221+00:00 app[web.1]: shortly after. 2017-02-08T17:39:26.846221+00:00 app[web.1]: 2017-02-08T17:39:26.846222+00:00 app[web.1]: To disable this warning use “ng set --global warnings.packageDeprecation=false”. 2017-02-08T17:39:26.846223+00:00 app[web.1]: 2017-02-08T17:39:27.242157+00:00 app[web.1]: Cannot read property ‘input’ of null 2017-02-08T17:39:27.246940+00:00 app[web.1]: TypeError: Cannot read property ‘input’ of null 2017-02-08T17:39:27.246943+00:00 app[web.1]: at ObjectSchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:347:132) 2017-02-08T17:39:27.246943+00:00 app[web.1]: at new ObjectSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:331:14) 2017-02-08T17:39:27.246944+00:00 app[web.1]: at OneOfSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:244:24) 2017-02-08T17:39:27.246945+00:00 app[web.1]: at /app/node_modules/@ngtools/json-schema/src/schema-tree.js:260:26 2017-02-08T17:39:27.246947+00:00 app[web.1]: at Array.map (native) 2017-02-08T17:39:27.246947+00:00 app[web.1]: at new OneOfSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:259:48) 2017-02-08T17:39:27.246948+00:00 app[web.1]: at ArraySchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:244:24) 2017-02-08T17:39:27.246949+00:00 app[web.1]: at ArraySchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:434:39) 2017-02-08T17:39:27.246949+00:00 app[web.1]: at new ArraySchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:414:14) 2017-02-08T17:39:27.246950+00:00 app[web.1]: at ObjectSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:244:24) 2017-02-08T17:39:27.246951+00:00 app[web.1]: at ObjectSchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:347:47) 2017-02-08T17:39:27.246951+00:00 app[web.1]: at new ObjectSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:331:14) 2017-02-08T17:39:27.246952+00:00 app[web.1]: at ArraySchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:244:24) 2017-02-08T17:39:27.246953+00:00 app[web.1]: at ArraySchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:434:39) 2017-02-08T17:39:27.246953+00:00 app[web.1]: at new ArraySchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:414:14) 2017-02-08T17:39:27.246954+00:00 app[web.1]: at RootSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:244:24) 2017-02-08T17:39:27.246955+00:00 app[web.1]: at RootSchemaTreeNode.ObjectSchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:347:47) 2017-02-08T17:39:27.246956+00:00 app[web.1]: at RootSchemaTreeNode.ObjectSchemaTreeNode [as constructor] (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:331:14) 2017-02-08T17:39:27.246956+00:00 app[web.1]: at new RootSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:478:16) 2017-02-08T17:39:27.246957+00:00 app[web.1]: at GeneratedSchemaClass.SchemaClassBase (/app/node_modules/@ngtools/json-schema/src/schema-class-factory.js:66:29) 2017-02-08T17:39:27.246958+00:00 app[web.1]: at new GeneratedSchemaClass (/app/node_modules/@ngtools/json-schema/src/schema-class-factory.js:165:20) 2017-02-08T17:39:27.246958+00:00 app[web.1]: at new CliConfig (/app/node_modules/angular-cli/models/config/config.js:24:24) 2017-02-08T17:39:27.246959+00:00 app[web.1]: at Function.CliConfig.fromConfigPath (/app/node_modules/angular-cli/models/config/config.js:99:16) 2017-02-08T17:39:27.246960+00:00 app[web.1]: at Function.CliConfig.fromProject (/app/node_modules/angular-cli/models/config.js:63:44) 2017-02-08T17:39:27.246960+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/angular-cli/commands/serve.js:6:33) 2017-02-08T17:39:27.246961+00:00 app[web.1]: at Module._compile (module.js:571:32) 2017-02-08T17:39:27.246962+00:00 app[web.1]: at Object.Module._extensions…js (module.js:580:10) 2017-02-08T17:39:27.246962+00:00 app[web.1]: at Module.load (module.js:488:32) 2017-02-08T17:39:27.246963+00:00 app[web.1]: at tryModuleLoad (module.js:447:12) 2017-02-08T17:39:27.246963+00:00 app[web.1]: at Function.Module._load (module.js:439:3) 2017-02-08T17:39:27.246964+00:00 app[web.1]: at Module.require (module.js:498:17) 2017-02-08T17:39:27.246964+00:00 app[web.1]: at require (internal/module.js:20:19) 2017-02-08T17:39:27.246965+00:00 app[web.1]: at Class.includedCommands (/app/node_modules/angular-cli/addon/index.js:23:16) 2017-02-08T17:39:27.246966+00:00 app[web.1]: at /app/node_modules/angular-cli/ember-cli/lib/models/project.js:316:61 2017-02-08T17:39:27.246966+00:00 app[web.1]: at Array.forEach (native) 2017-02-08T17:39:27.246967+00:00 app[web.1]: at Project.addonCommands (/app/node_modules/angular-cli/ember-cli/lib/models/project.js:315:15) 2017-02-08T17:39:27.246968+00:00 app[web.1]: at Project.eachAddonCommand (/app/node_modules/angular-cli/ember-cli/lib/models/project.js:350:30) 2017-02-08T17:39:27.246968+00:00 app[web.1]: at module.exports (/app/node_modules/angular-cli/ember-cli/lib/cli/lookup-command.js:33:13) 2017-02-08T17:39:27.246969+00:00 app[web.1]: at CLI.<anonymous> (/app/node_modules/angular-cli/ember-cli/lib/cli/cli.js:42:26) 2017-02-08T17:39:27.246970+00:00 app[web.1]: at tryCatch (/app/node_modules/rsvp/dist/rsvp.js:538:12) 2017-02-08T17:39:27.246970+00:00 app[web.1]: at invokeCallback (/app/node_modules/rsvp/dist/rsvp.js:553:13) 2017-02-08T17:39:27.246971+00:00 app[web.1]: at publish (/app/node_modules/rsvp/dist/rsvp.js:521:7) 2017-02-08T17:39:27.246971+00:00 app[web.1]: at flush (/app/node_modules/rsvp/dist/rsvp.js:2373:5) 2017-02-08T17:39:27.246972+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:67:7) 2017-02-08T17:39:27.246973+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:98:9) 2017-02-08T17:39:27.259675+00:00 app[web.1]: 2017-02-08T17:39:27.279872+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic 2017-02-08T17:39:27.280544+00:00 app[web.1]: npm ERR! argv “/app/.heroku/node/bin/node” “/app/.heroku/node/bin/npm” “start” 2017-02-08T17:39:27.281033+00:00 app[web.1]: npm ERR! node v7.4.0 2017-02-08T17:39:27.281383+00:00 app[web.1]: npm ERR! npm v4.0.5 2017-02-08T17:39:27.281690+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2017-02-08T17:39:27.281913+00:00 app[web.1]: npm ERR! angular-app@0.0.0 start:
ng serve
2017-02-08T17:39:27.282111+00:00 app[web.1]: npm ERR! Exit status 1 2017-02-08T17:39:27.282396+00:00 app[web.1]: npm ERR! 2017-02-08T17:39:27.282597+00:00 app[web.1]: npm ERR! Failed at the angular-app@0.0.0 start script ‘ng serve’. 2017-02-08T17:39:27.283078+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 2017-02-08T17:39:27.283658+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the angular-app package, 2017-02-08T17:39:27.283994+00:00 app[web.1]: npm ERR! not with npm itself. 2017-02-08T17:39:27.284353+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 2017-02-08T17:39:27.284557+00:00 app[web.1]: npm ERR! ng serve 2017-02-08T17:39:27.284771+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 2017-02-08T17:39:27.284981+00:00 app[web.1]: npm ERR! npm bugs angular-app 2017-02-08T17:39:27.285178+00:00 app[web.1]: npm ERR! Or if that isn’t available, you can get their info via: 2017-02-08T17:39:27.285372+00:00 app[web.1]: npm ERR! npm owner ls angular-app 2017-02-08T17:39:27.285571+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 2017-02-08T17:39:27.291449+00:00 app[web.1]: 2017-02-08T17:39:27.291721+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 2017-02-08T17:39:27.291870+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2017-02-08T17:39:27.420149+00:00 heroku[web.1]: Process exited with status 1 2017-02-08T17:39:27.486537+00:00 heroku[web.1]: State changed from starting to crashed
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (3 by maintainers)
Don’t use ng serve outside of your computer 😃 Use another html server or create a simple express server.js.
Also, try disabling NODE_MODULES_CACHE: https://devcenter.heroku.com/articles/nodejs-support#cache-behavior
Example package.json with scripts for Heroku (notice that I moved @angular/cli from dev and a few others so you can build on postinstall:
Example server.js:
It’s developed to be used as a development server so:
And this line 😄 https://github.com/angular/angular-cli/blob/b8328dca5531211fcd7411e229cfe2da64d0b65e/packages/%40angular/cli/tasks/serve.ts#L123