Угловой полный стек | Yeoman - не удалось нажать на git с помощью heroku

Для школьного проекта мне нужно разработать веб-приложение с использованием генератора Angular-fullstack от Yeoman.

В процессе мне нужно запустить свое веб-приложение с помощью 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"
    ...

person Silvio Giovanni    schedule 02.12.2016    source источник
comment
Я действительно не знаю о Heroku, но, возможно, это поможет найти ENONET. Это стандартная ошибка Linux с описанием Machine is not on the network.   -  person das_j    schedule 02.12.2016
comment
какую версию angular-fullstack вы используете?   -  person DevManny    schedule 02.12.2016
comment
Я использую последнюю версию: [email protected]   -  person Silvio Giovanni    schedule 02.12.2016
comment
@DevManny Я провел небольшое исследование. Итак, запуск heroku run bash обеспечит среду оболочки? Однако команда node не работает. При переходе к /usr/local/src $ ls он пуст. Раньше я набирал gulp serve, чтобы увидеть свое приложение на localhost:3000   -  person Silvio Giovanni    schedule 02.12.2016
comment
попробуйте запустить локально gulp serve:dist и... какую версию узла вы используете локально?   -  person DevManny    schedule 04.12.2016


Ответы (1)


Есть простые шаги, которые нужно выполнить, в первый раз отправляя проект angular-fullstack мастеру heroku.


Эти шаги выполняются с помощью инструмента gulp с использованием cmd (для Windows Machine).

  1. Вы должны запустить gulp build из корневого каталога проекта для производственной сборки.
  2. Измените каталог из корневой папки проекта в папку сборки (из cmd).
  3. Инициализируйте репозиторий git, введя git init в cmd.
  4. Создайте проект heroku на панели инструментов heroku.
  5. Введите heroku login в cmd , если вы не вошли в систему с помощью heroku.
  6. Добавьте удаленный репозиторий heroku, введя heroku git:remote -a (имя вашего приложения на панели управления heroku). например heroku git:remote -a myapp
  7. Введите git add ., чтобы добавить все файлы в git.
  8. Введите git commit -am "сделать лучше" для фиксации в репозитории heroku git.
  9. Введите git push heroku master, чтобы отправить репозиторий на heroku master.
person Tauqeer Ahmed Shakir    schedule 06.12.2016
comment
Я попробую это сегодня вечером! - person Silvio Giovanni; 07.12.2016