如何使用Heruko修复此语法错误

时间:2020-03-29 00:31:32

标签: git

每次尝试将代码推入heroku时,我都会不断遇到此错误,并且似乎看不到出什么问题。这是我得到的错误

{
  "name": "manuela",
  "version": "1.0.0",
  "description": "needed package",
  "proxy": "http://localhost:3001",
  "main": "index.js",
  "repository": "git@github.com:nela94/PetMe.git",
  "author": "<github username> <<github email address>>",
  "license": "MIT"
}

"scripts": {
    "build": "cd client && yarn install && yarn build && cd ..",
    "deploy": "cp -a client/build/. public/",
    "postinstall": "yarn build && yarn deploy && echo 'Client built!''"
  },
  "engines": {
    "yarn": "1.15.2",
    "npm": "6.9.0",
    "node": "11.8.0"
  }

这是我在package.json中的代码

src="/storage/images/VW5wb8YGHetqZy8BKcnQuCVGcJwqXgakKViyeuoV.jpeg"

1 个答案:

答案 0 :(得分:0)

您的package.json似乎用括号和逗号隔开了。

尝试一下

{
  "name": "manuela",
  "version": "1.0.0",
  "description": "needed package",
  "proxy": "http://localhost:3001",
  "main": "index.js",
  "repository": "git@github.com:nela94/PetMe.git",
  "author": "<github username> <<github email address>>",
  "license": "MIT",
  "scripts": {
    "build": "cd client && yarn install && yarn build && cd ..",
    "deploy": "cp -a client/build/. public/",
    "postinstall": "yarn build && yarn deploy && echo 'Client built!''"
  },
  "engines": {
    "yarn": "1.15.2",
    "npm": "6.9.0",
    "node": "11.8.0"
  }
}