Я действительно новичок в Heroku, и я пытался развернуть приложение Hello World с node.js.Ошибка при развертывании Heroku: невозможно разобрать package.json
Проблема заключается в том, что у меня есть эта
error: failed to push some refs to 'https://git.heroku.com/sebasaenz.git'
, но я не знаю, как решить эту проблему. По предыдущим сообщениям об ошибке, похоже, это связано с файлом package.json, но я попытался найти в документации, что может быть проблемой, и я действительно не понял, что это может быть.
Вот сообщение об ошибке после ввода git push heroku master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 920 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: parse error: Expected another key-value pair at line 14, column 3
remote: ! Unable to parse package.json
remote:
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sebasaenz.
remote:
To https://git.heroku.com/sebasaenz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sebasaenz.git'
Моего файла package.json является следующее:
{
"name": "hello-world",
"version": "1.0",
"description": "Node demo",
"engines": {
"node": "5.9.1"
},
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"ejs": "2.4.1"
}, //this is line 14
"repository": {
"type": "git",
"url": "https://git.heroku.com/sebasaenz.git"
},
"keywords": [
"node",
"heroku"
],
"license": "MIT"
}
Я уже смотрел на должность с аналогичным characterstics, но я не сделал не находите ничего, что могло бы мне помочь.
Спасибо за ваш ответ, но он продолжает давать мне то же самое сообщение об ошибке. Я отредактирую сообщение, чтобы исправить это. – sebasaenz