Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.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
Heroku没有检测Node.js构建包_Node.js_Git_Heroku_Terminal_Hyper - Fatal编程技术网

Heroku没有检测Node.js构建包

Heroku没有检测Node.js构建包,node.js,git,heroku,terminal,hyper,Node.js,Git,Heroku,Terminal,Hyper,我正在使用Heroku并尝试部署我的代码,但是当我尝试部署时,我得到了一个错误 它说它没有检测到任何构建包,但我已经做了版本检查并安装了最新的Node.js 我有什么遗漏吗 终端: Creating app... done, ⬢ boiling-lake-07398 https://boiling-lake-07398.herokuapp.com/ | https://git.heroku.com/boiling-lake-07398.git Shons-MacBook-Pro:Newslett

我正在使用Heroku并尝试部署我的代码,但是当我尝试部署时,我得到了一个错误

它说它没有检测到任何构建包,但我已经做了版本检查并安装了最新的Node.js

我有什么遗漏吗

终端:

Creating app... done, ⬢ boiling-lake-07398
https://boiling-lake-07398.herokuapp.com/ | https://git.heroku.com/boiling-lake-07398.git
Shons-MacBook-Pro:Newsletter-Signup shonswope$ git push heroku master
Enumerating objects: 1305, done.
Counting objects: 100% (1305/1305), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1248/1248), done.
Writing objects: 100% (1305/1305), 1.87 MiB | 455.00 KiB/s, done.
Total 1305 (delta 179), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote:  !     No default language could be detected for this app.
remote:                         HINT: This occurs when Heroku cannot detect the buildpack to use for this a
pplication automatically.
remote:                         See https://devcenter.heroku.com/articles/buildpacks
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to pacific-bastion-08294.
remote: 
To https://git.heroku.com/pacific-bastion-08294.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pacific-bastion-08294.git'
Shons-MacBook-Pro:Newsletter-Signup shonswope$ npm --version
6.12.0
Shons-MacBook-Pro:Newsletter-Signup shonswope$ node --version
v12.13.0
Shons-MacBook-Pro:Newsletter-Signup shonswope$ git --version
git version 2.24.3 (Apple Git-128)
Shons-MacBook-Pro:Newsletter-Signup shonswope$ 
尽管如此,在错误消息中出现错误后,请尝试显式设置buildpack:

heroku buildpacks:set heroku/nodejs
如果删除或重命名以前导致自动检测应用程序类型的文件,从而自动设置应用程序上检测到的buildpack,也可能发生这种情况

同时检查,以及您的。
正如所示,该
package.json
Procfile
必须位于项目的根文件夹中。

仍然,在错误消息中的之后,尝试显式设置buildpack:

heroku buildpacks:set heroku/nodejs
如果删除或重命名以前导致自动检测应用程序类型的文件,从而自动设置应用程序上检测到的buildpack,也可能发生这种情况

同时检查,以及您的。
同样,该
package.json
Procfile
必须位于项目的根文件夹中