Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROJECT_PATH is undefined #5

Open
619 opened this issue Aug 22, 2020 · 16 comments
Open

PROJECT_PATH is undefined #5

619 opened this issue Aug 22, 2020 · 16 comments

Comments

@619
Copy link

619 commented Aug 22, 2020

This is what I get when I follow the steps listed in the README.md

-----> Subdir buildpack app detected
PROJECT_PATH is undefined
! Push rejected, failed to compile Subdir buildpack app.
! Push failed

@mateussmohamed
Copy link

mateussmohamed commented Sep 15, 2020

@619 try to use app instead projects/nodejs/app only value in PROJECT_PATH environment variable

@Diego-Paris
Copy link

I'm getting the same error mentioned but the solution provided by @mateussmohamed does not work for me. Is there another approach to this error? PROJECT_PATH continues to be undefined.

@riggiobill
Copy link

Hello, I'm having the same error as well. I have "Code" as the only value in my right-hand box on Config Vars and I am getting the same message in error as well:

"PROJECT_PATH is undefined
! Push rejected, failed to compile Subdir buildpack app."

@JosephKilbane
Copy link

I fixed this by just removing the build pack and in my travis.yml file added in a before_script: cd frontEnd
My travis file is in the parent folder of the project

More to my answer here https://stackoverflow.com/questions/54878184/how-to-deploy-a-subfolder-in-repository-to-heroku-via-travis-ci/66025176#66025176

@sguridirt
Copy link

I had the same problem, but I was able to fix it.
My github repository structure that I was hosting on Heroku was like this:

repository_name/
├─ my_project_to_run/
│   ├─ run.py
│   ├─ ...

I had set the PROJECT_PATH config var to repository_name/my_project_to_run but it didn't work.

Instead, inspired by @mateussmohamed reply,

@619 try to use app instead projects/nodejs/app only value in PROJECT_PATH environment variable

I set the PROJECT_PATH config var to only my_project_to_run and it worked flawlessly.

Hope it helps. 👍

@gminetoma
Copy link

-----> Building on the Heroku-20 stack
-----> Using buildpacks:
1. https://github.com/timanovsky/subdir-heroku-buildpack.git
2. heroku/java
-----> Subdir buildpack app detected
PROJECT_PATH is undefined
! Push rejected, failed to compile Subdir buildpack app.
! Push failed

Same Error!!!! Any Fix!?

Already defined the PROJECT_PATH in the setting tab and nothing.

@SirawichDev
Copy link

@619 try to use app instead projects/nodejs/app only value in PROJECT_PATH environment variable

this solution worked for me. Thanks, my time saver!

@udemezue01
Copy link

it did not work for me

@msmans
Copy link

msmans commented Mar 22, 2022

Looks like if you have a single subdirectory, Heroku changes into it automatically and thus the build root is no longer your repository root. If that's the case, just add a subdirectory at root of your repo with a single empty file in it. E.g.

/my-project-dir/package.json
/empty-dir/.keep

@wandersonmaceds
Copy link

Looks like if you have a single subdirectory, Heroku changes into it automatically and thus the build root is not longer your repository root. If that's the case, just add a subdirectory at root of your repo with a single empty file in it. E.g.

/my-project-dir/package.json
/empty-dir/.keep

You're right, I did what you suggested and worked for me! Thanks!

@udemezue01
Copy link

udemezue01 commented Mar 31, 2022 via email

@Rajthegreat123
Copy link

My file structure is like
My_Username/Project_Name/server.js

what should i use as the project path

@udemezue01
Copy link

udemezue01 commented Aug 22, 2022 via email

@Rajthegreat123
Copy link

ok i am waiting

@udemezue01
Copy link

udemezue01 commented Aug 24, 2022 via email

@Gilsonlgd
Copy link

Gilsonlgd commented May 30, 2023

i had the same problem but i solved changing the path name from backend to Backend. It seems to be different to Heroku

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests