Heroku不会更新

时间:2017-01-19 20:43:08

标签: angular heroku

我正在使用Heroku,但似乎每当我将其推送给主人时它都不会更新我的代码。

$ git add .
$ git commit -am "make it better"
$ git push heroku master

但在我这样做之后没有任何事情发生....我把它推到主人之后的输出:

Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 494 bytes | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote: 
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=true
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote: 
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version (latest stable) via semver.io...
remote:        Downloading and installing node 6.9.1...
remote:        Using default npm version: 3.10.8
remote: 
remote: -----> Restoring cache
remote:        Loading 2 from cacheDirectories (default):
remote:        - node_modules
remote:        - bower_components (not cached - skipping)
remote: 
remote: -----> Building dependencies
remote:        Installing node modules (package.json)
remote:        
remote:        > angular2-express-slim@0.0.0 postinstall /tmp/build_dcfbba691d5c6f4b81e12dbe7f938c55
remote:        > npm run build:prod
remote:        
remote:        
remote:        > angular2-express-slim@0.0.0 build:prod /tmp/build_dcfbba691d5c6f4b81e12dbe7f938c55
remote:        > node bin/bundler.js --prod
remote:        
remote:        Unhandled rejection Error on fetch for app/main.js at file:///tmp/build_dcfbba691d5c6f4b81e12dbe7f938c55/app/main.js
remote:        Error: ENOENT: no such file or directory, open '/tmp/build_dcfbba691d5c6f4b81e12dbe7f938c55/app/main.js'
remote:        at Error (native)
remote: 
remote: -----> Caching build
remote:        Clearing previous node cache
remote:        Saving 2 cacheDirectories (default):
remote:        - node_modules
remote:        - bower_components (nothing to cache)
remote: 
remote: -----> Build succeeded!
remote:        ├── @angular/common@2.1.2
remote:        ├── @angular/compiler@2.1.2
remote:        ├── @angular/core@2.1.2
remote:        ├── @angular/forms@2.1.2
remote:        ├── @angular/http@2.1.2
remote:        ├── @angular/platform-browser@2.1.2
remote:        ├── @angular/platform-browser-dynamic@2.1.2
remote:        ├── @angular/router@3.1.2
remote:        ├── @angular/upgrade@2.1.2
remote:        ├── @types/core-js@0.9.35
remote:        ├── @types/node@6.0.60
remote:        ├── angular-in-memory-web-api@0.1.17
remote:        ├── body-parser@1.13.3
remote:        ├── compression@1.6.2
remote:        ├── cookie-parser@1.3.5
remote:        ├── core-js@2.4.1
remote:        ├── debug@2.2.0
remote:        ├── express@4.13.4
remote:        ├── morgan@1.6.1
remote:        ├── reflect-metadata@0.1.9
remote:        ├── UNMET PEER DEPENDENCY rxjs@5.0.0-beta.12
remote:        ├── systemjs-builder@0.15.34
remote:        ├── typescript@2.1.5
remote:        ├── yargs@4.8.1
remote:        └── UNMET PEER DEPENDENCY zone.js@0.6.26
remote:        
remote:  !     Unmet dependencies don't fail npm install but may cause runtime issues
remote:        https://github.com/npm/npm/issues/7494
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote: 
remote: -----> Compressing...
remote:        Done: 35.5M
remote: -----> Launching...
remote:        Released v5
remote:        https://something.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/something.git
   fd25f32..505de47  master -> master

奇怪的是,我设法部署它,但不知道我是如何做到的。另外,当我看到我部署最后一个时,是在一段时间之前。 提前谢谢!

2 个答案:

答案 0 :(得分:1)

如果您使用Heroku的免费版Dyno(Heroku术语中的实例),它将在30分钟不活动后休眠。在这种情况下,您需要点击实例的URL,以便Dyno可以从睡眠中醒来。

你的Heroku命令看起来是正确的,Heroku应该创建新版本并将其推送到Dyno。试试

heroku releases
在您的Heroku CLI中

并查看您的最新更改是否也已发布。

答案 1 :(得分:0)

确保您编辑的文件位于上次提交(git status