reactjs - 构建失败为什么?
问题描述
构建一直失败帮助!,如果我的 package.json 的详细信息可以发送,与该项目关联的 repo 是私有的。
-----> 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 的详细信息可以发送,与该项目关联的 repo 是私有的。
解决方案
问题已修复,我的posts
数组未定义。我检查了他们是否真的回来了,如果没有,他们为什么不回来并看到了posts was not defined
。
推荐阅读
- python - 使用具有多个元素的字典过滤数据框
- r - 循环基础 R 以获得每个区域的 pdf 图或该图的 ggplot 替代品
- python - 在散景中显示 wordlcud 的图像
- php - 如何删除php网页中不需要的字符?我越来越喜欢“;”;"; 字符由以下代码
- excel - 使用count if和sum与excel 2016中两个单元格上定义的范围
- python - ImportError:无法导入名称 httputil
- tensorflow - nv-nsight-cu-cli 导致 TensorFlow 失败
- reactjs - Webpack:“有多个模块的名称只是大小写不同”但引用的模块是相同的“但我找不到错字
- rest - 如何在 drupal 8 的 Rest 视图中显示文章的选定分类
- push-notification - 在 Actions on Google 中向其调用意图发送推送通知标题