node.js - git push heroku master 失败并出现解析错误 - 哪个文件?

标签 node.js git heroku

我在执行 git push heroku master 时遇到解析错误。 Heroku 告诉我哪一行哪一列导致了解析错误,但没有告诉我是哪个文件。我如何找出 heroku 解析哪个文件有问题?请指教。

----- package.json -----

{
  "name": "mean",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "mongoose": "3.8.7",
    "express": "3.4.8",
    "jade": "*",
    "stylus": "*"
  },
  "engines": {
    "node": "0.10.x",
    "npm": "1.4.x"
  }
}

----- output -----

[23:46 56] git push heroku master
Initializing repository, done.
Counting objects: 259, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (242/242), done.
Writing objects: 100% (259/259), 927.54 KiB | 550.00 KiB/s, done.
Total 259 (delta 13), reused 0 (delta 0)

-----> Node.js app detected
parse error: Expected separator between values at line 13, column 16

 !     Push rejected, failed to compile Node.js app

To git@heroku.com:mighty-mountain-5447.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:mighty-mountain-5447.git'

最佳答案

我也遇到过,这是我在 .json 文件中遗漏的逗号。

你可能没有马上把那个逗号放在第 13 行,但你犯了错误

  },

再次提交,然后推送到 Heroku。

关于node.js - git push heroku master 失败并出现解析错误 - 哪个文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21966019/

相关文章:

node.js - 在 Heroku 中找不到模块 'phantomjs'

ruby-on-rails-3 - Heroku Slug Size 突然变大

使用 SSL 在 Azure 网站上使用 Node.js 聊天

混帐庆典 : stuck after writing the message for commit

node.js - Mocha 正在复制对象的值,因此无法更新它

SVN 工具以 git 风格 rebase 分支

git - 如何搜索我的 git 别名?

ruby-on-rails - Heroku 应用程序似乎从错误的 Git 存储库/分支中提取

javascript - 无法在 Jenkins 中生成脚本文件

node.js - 借助 Windows Azure,我可以使用 Dropbox 部署 Node.js 服务器吗?