gpt4 book ai didi

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

转载 作者:搜寻专家 更新时间:2023-10-31 22:36:46 24 4
gpt4 key购买 nike

我在执行 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com