Angular App不在Heroku上部署

时间:2018-01-23 02:16:02

标签: node.js angular heroku

我正在尝试在Heroku上部署一个角度2应用程序,我按照指南进行操作并不断收到此错误。该错误可能与安装后有关,但我需要安装后用于我阅读的部署。我已经安装了npm @ angular / cli @ latest任何人都有想法吗?

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.7.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.7.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely 
additional logging output above.

以下是我的package.json

 {
   "name": "mars-colony",
   "version": "0.0.0",
   "license": "MIT",
   "scripts": {
     "ng": "ng",
     "start": "node server.js",
     "build": "ng build",
     "test": "ng test",
     "lint": "ng lint",
     "e2e": "ng e2e",
     "postinstall":"ng build --aot --target=production"
   }     ,
   "private": true,
   "dependencies": {
     "@angular/common": "^2.4.0",
     "@angular/cli": "1.0.0-rc.0",
     "@angular/compiler-cli": "^2.4.0",
     "@angular/compiler": "^2.4.0",
     "@angular/core": "^2.4.0",
     "@angular/forms": "^2.4.0",
     "@angular/http": "^2.4.0",
     "@angular/platform-browser": "^2.4.0",
     "@angular/platform-browser-dynamic": "^2.4.0",
     "@angular/router": "^3.4.0",
     "core-js": "^2.4.1",
     "ng2-page-transition": "^1.0.4",
     "rxjs": "^5.1.0",
     "typescript": "~2.0.0",
     "web-animations-js": "^2.2.2",
     "zone.js": "^0.7.6"
   },
   "devDependencies": {
     "@types/jasmine": "2.5.38",
     "@types/node": "~6.0.60",
     "codelyzer": "~2.0.0",
     "jasmine-core": "~2.5.2",
     "jasmine-spec-reporter": "~3.2.0",
     "karma": "~1.4.1",
     "karma-chrome-launcher": "~2.0.0",
     "karma-cli": "~1.0.1",
     "karma-coverage-istanbul-reporter": "^0.2.0",
     "karma-jasmine": "~1.1.0",
     "karma-jasmine-html-reporter": "^0.2.2",
     "node-sass": "^4.5.0",
     "protractor": "~5.1.0",
     "ts-node": "~2.0.0",
     "tslint": "~4.4.2"
   },
   "engines": {
     "node": "8.9.4",
     "npm": "5.6.0"
   }
 }

我对节点不是很熟悉,但是一切似乎都像指南所说的那样正确设置。以下是我的回购

https://github.com/edwardlanto/mars-heroku

谢谢!

0 个答案:

没有答案