2016-12-02 57 views
0

爲了學校項目的目的,我需要使用Yeoman的Angular-fullstack generator來開發Web應用程序。Angular-fullstack | Yeoman - 推動heroku失敗

在這個過程中,我需要推動我的網絡應用程序與heroku。我跟所有的步驟,但是當我

git push heroku master 

我得到一個錯誤信息:

remote:  > typings install 
remote:   
remote:  sh: 1: typings: not found 
remote:   
remote:  npm ERR! Linux 3.13.0-100-generic 
remote:  npm ERR! argv "/tmp/build_619bf0f5cc66ca8fa9680ec4149eaa76/.heroku/node/bin/node" "/tmp/build_619bf0f5cc66ca8fa9680ec4149eaa76/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_619bf0f5cc66ca8fa9680ec4149eaa76/.npmrc" 
remote:  npm ERR! node v6.9.1 
remote:  npm ERR! npm v4.0.3 
remote:  npm ERR! file sh 
remote:  npm ERR! code ELIFECYCLE 
remote:  npm ERR! errno ENOENT 
remote:  npm ERR! syscall spawn 
remote:  npm ERR! [email protected] postinstall: `typings install` 
remote:  npm ERR! spawn ENOENT 
remote:  npm ERR! 
remote:  npm ERR! Failed at the [email protected] postinstall script 'typings install'. 
remote:  npm ERR! Make sure you have the latest version of node.js and npm installed. 
remote:  npm ERR! If you do, this is most likely a problem with the projet-yboo-emotion package, 
remote:  npm ERR! not with npm itself. 
remote:  npm ERR! Tell the author that this fails on your system: 
remote:  npm ERR!  typings install 

... 

remote: !  Push rejected, failed to compile Node.js app. 
remote: 
remote: !  Push failed 
remote: Verifying deploy.... 
remote: 
remote: ! Push rejected to ybooemotiont3m. 
remote: 
To https://git.heroku.com/ybooemotiont3m.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/ybooemotiont3m.git' 

我真的不明白,爲什麼......我有安裝分型:

typings --version 
    2.0.0 

在我package.json

"dependencies": { 
    ... 
    "typings": "^2.0.0" 
    ... 
+0

我並不真正瞭解Heroku,但也許它有助於查找ENONET。這是一個標準的Linux錯誤,描述爲「機器不在網絡上」 –

+0

您使用的是什麼angular-fullstack版本? – DevManny

+0

我使用的是最新的:[email protected] –

回答

0

有一些簡單的步驟可以遵循,同時首次將角度全堆項目推向heroku master。


這些步驟與使用cmd的gulp工具(適用於Windows機器)。

  1. 您必須從生產版本的項目根目錄運行gulp build
  2. 將目錄從項目根文件夾更改爲生成文件夾(從cmd)。
  3. 在cmd上鍵入git init來初始化git存儲庫。
  4. 在heroku儀表板上創建heroku項目。
  5. 類型heroku登錄在cmd上,如果您未使用heroku登錄。
  6. 通過鍵入heroku git:remote -a(您的應用程序的名稱來自heroku儀表板)添加遠程heroku存儲庫。例如heroku git:remote -a myapp
  7. 類型git add。用於將所有文件添加到git。
  8. 類型git commit -am「讓它變得更好」承諾heroku git回購。
  9. 類型git push heroku主人推動英雄主人回購。
+0

今晚我會試試這個! –