我目前正在开发Angular 2应用并将其上传到heroku上。
当我只是上传而不使用任何调用div中的任何类。当我使用git push heroku master
时,它会在heroku上传
比如我的appcomponent.html
<h1>
{{title}}
</h1>
<div>
<h2>Gtting started.....</h2>
</div>
到目前为止它工作正常。但是一旦我添加了这些潜水或任何其他div与造型
`<div class="footer-newsletter">
<div class="container-fluid">
<p style="color:#36b4d2">Search and Save</p>
<form>
<input type="search" name=query [(ngModel)]="query"
#quer="ngModel" class="form-control" placeholder="Search" required>
<button type="button" (click)="Search()" class="btn btn-custom">Search</button>
</form>
</div><!-- End .container-fluid -->
</div><!-- End .footer-newsletter -->
`
它在heroku push master命令
上给出了这个错误 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/some.git'
我在资产中添加了css文件,并且工作正常。任何人都可以告诉我这背后的原因是什么。我已经浪费了两天时间。任何帮助都会受到高度关注。
的package.json
{
"name": "erecommender",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "node server.js",
"test": "ng test",
"postinstall": "ng build --aot -prod",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"engines": {
"node": "6.10.2",
"npm": "4.5.0"
},
"private": true,
"dependencies": {
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/core": "^2.3.1",
"@angular/forms": "^2.3.1",
"@angular/http": "^2.3.1",
"@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "^2.3.1",
"@angular/router": "^3.3.1",
"angular-cli": "1.0.0-beta.28.3",
"core-js": "^2.4.1",
"express": "^4.15.2",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/compiler-cli": "^2.3.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.28.3",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.3.0",
"typescript": "~2.0.3"
}
}