Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何将nodejs和vuejs部署到heroku_Node.js_Vue.js_Heroku_Deployment - Fatal编程技术网

Node.js 如何将nodejs和vuejs部署到heroku

Node.js 如何将nodejs和vuejs部署到heroku,node.js,vue.js,heroku,deployment,Node.js,Vue.js,Heroku,Deployment,如何将我的项目部署到heroku。 我的代码库在这里: 我尝试部署到heroku,但总是出现错误 -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz ! ERROR: Application not supported by 'heroku/nodejs' buildpack ! !

如何将我的项目部署到heroku。 我的代码库在这里:


我尝试部署到heroku,但总是出现错误

-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz

 !     ERROR: Application not supported by 'heroku/nodejs' buildpack
 !     
 !     The 'heroku/nodejs' buildpack is set on this application, but was
 !     unable to detect a Node.js codebase.
 !         
 !     A Node.js app on Heroku requires a 'package.json' at the root of
 !     the directory structure.
 !     
 !     If you are trying to deploy a Node.js application, ensure that this
 !     file is present at the top level directory. This directory has the
 !     following files:
 !     
 !     Procfile
 !     server/
 !     tsconfig.json
 !     vue/
 !         
 !     If you are trying to deploy an application written in another
 !     language, you need to change the list of buildpacks set on your
 !     Heroku app using the 'heroku buildpacks' command.
 !         
 !     For more information, refer to the following documentation:
 !     https://devcenter.heroku.com/articles/buildpacks
 !     https://devcenter.heroku.com/articles/nodejs-support#activation
       More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
 !     Push failed

我可以将heroku配置更改为使用子文件夹中的程序包文件吗?

请根据应用程序结构重新构造您的应用程序heroku identity应用程序。
root
目录中没有
package.json
文件
最好将
后端
前端
作为单独的应用程序进行部署


希望这对你有帮助。愉快的编码。

package.json文件需要在根文件中,这样heroku就可以理解这是nodejs项目尝试按照此链接更改应用程序structure@RaiTalhaRehmanKhan所以,我应该改变我的项目结构吗。是吗?是的,改变结构