2016-12-02 54 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

今晚我会试试这个! –