首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Angular-fullstack | Yeoman -使用heroku推送git失败

Angular-fullstack | Yeoman -使用heroku推送git失败
EN

Stack Overflow用户
提问于 2016-12-02 21:55:42
回答 1查看 114关注 0票数 0

为了一个学校项目的目的,我需要使用Yeoman的Angular-fullstack生成器开发一个web应用程序。

在这个过程中,我需要使用heroku推送我的web应用程序。我遵循了所有的步骤,但当我

代码语言:javascript
复制
    git push heroku master

我收到一条错误消息:

代码语言:javascript
复制
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! projet-yboo-emotion@0.0.0 postinstall: `typings install`
remote:        npm ERR! spawn ENOENT
remote:        npm ERR!
remote:        npm ERR! Failed at the projet-yboo-emotion@0.0.0 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'

我不太明白为什么..。我已经安装了类型:

代码语言:javascript
复制
    typings --version
    2.0.0

在我的package.json中:

代码语言:javascript
复制
    "dependencies": {
    ...
    "typings": "^2.0.0"
    ...
EN

回答 1

Stack Overflow用户

发布于 2016-12-07 03:30:29

第一次向heroku master推送angular-fullstack项目时,有一些简单的步骤可以遵循。

这些步骤是使用cmd (用于Windows机器)的gulp工具实现的。

heroku

  • 您必须从项目根目录运行gulp 以进行生产构建。

  • 将目录从项目根文件夹更改到build文件夹(通过在命令上键入git init从heroku git存储库更改目录。

  • 在heroku dashboard.

  • Type上创建heroku项目heroku login,如果您没有使用heroku登录。

  • 通过键入heroku git:remote -a (来自heroku仪表板的应用程序名称)添加远程heroku存储库。例如myapp

  • Type git:remote -a git git add .用于将所有文件添加到git。

  • 键入git commit -am "make it better"用于提交到heroku git存储库。

  • 键入git推送heroku master以在heroku master上推送存储库。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40933860

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档