如何将我的节点应用程序成功推送到Heroku?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何将我的节点应用程序成功推送到Heroku?相关的知识,希望对你有一定的参考价值。
我创建了我的react应用,正在尝试第二天使用git push Heroku master将其推送到Heroku。我得到一个错误。我尝试了Heroku支持和stackoverflow的所有常见解决方案。我一定缺少一些关键的部分。有人可以帮我吗?这是Heroku日志显示的内容:
Installing dependencies
Installing node modules (package.json + package-lock)
> node@13.8.0 preinstall /tmp/build_0b181828458420237db1b578ab12a219/node_modules/node
> node installArchSpecificPackage
npm ERR! code ETARGET
npm ERR! notarget No matching version found for node-linux-x64@13.8.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.TaYmU/_logs/2020-02-19T18_52_08_718Z-debug.log
internal/modules/cjs/loader.js:796
throw err;
^
Error: Cannot find module 'node-linux-x64/package.json'
Require stack:
- /tmp/build_0b181828458420237db1b578ab12a219/node_modules/node/installArchSpecificPackage.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.resolve (internal/modules/cjs/helpers.js:80:19)
at ChildProcess.<anonymous> (/tmp/build_0b181828458420237db1b578ab12a219/node_modules/node-bin-setup/index.js:18:27)
at ChildProcess.emit (events.js:223:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/tmp/build_0b181828458420237db1b578ab12a219/node_modules/node/installArchSpecificPackage.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node@13.8.0 preinstall: `node installArchSpecificPackage`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node@13.8.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.TaYmU/_logs/2020-02-19T18_52_10_684Z-debug.log
-----> 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:
- A module may be missing from 'dependencies' in package.json
https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies
Love,
Heroku
! Push rejected, failed to compile React.js (create-react-app) multi app.
! Push failed
谢谢!!
答案
解决了!解决方案是从package.json中删除节点依赖性。
以上是关于如何将我的节点应用程序成功推送到Heroku?的主要内容,如果未能解决你的问题,请参考以下文章
每当我尝试将我的 django 应用程序推送到 Heroku 时,我的日志文件中都会出现以下错误,请协助我应该如何解决它,
当我尝试将我的应用推送到 Heroku 时,我收到了以下回复:
为啥当我尝试将我的 Spring Boot 应用程序推送到 heroku 时它返回“致命错误编译:无效目标版本:11”
如何更新堆栈并将克隆的应用程序推送到 Heroku [重复]
已成功上传到 Heroku Local,但一旦推送到 Heroku live 就会出现 503 错误
尝试将我的应用程序推送到 heroku 时出现此错误 FileNotFoundError: [Errno 2] No such file or directory: '/app/gettingstar