构建一直在失败!!,如果可以发送我的package.json上的详细信息,则与此项目关联的存储库是私有的。
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): unspecified (use default)
Resolving node version 10.x...
Downloading and installing node 10.15.1...
Using default npm version: 6.4.1
Resolving yarn version 1.x...
Downloading and installing yarn (1.14.0)...
Installed yarn 1.14.0
-----> Building dependencies
Installing node modules (yarn.lock)
yarn install v1.14.0
error An unexpected error occurred: "/tmp/build_92785ec867666d739a3a4a010d233406/package.json: Unexpected token { in JSON at position 2383".
info If you think this is a bug, please open a bug report with the information provided in "/tmp/build_92785ec867666d739a3a4a010d233406/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
构建一直在失败!!,如果可以发送我的package.json上的详细信息,则与此项目关联的存储库是私有的。
答案 0 :(得分:0)
该问题已解决,我的posts
数组未定义。我检查了他们是否真的返回了,如果不是,为什么不返回,看到了posts was not defined
。