Coder Social home page Coder Social logo

Comments (9)

mars avatar mars commented on May 20, 2024

JS_RUNTIME_TARGET_BUNDLE definitely works as designed, so something is missing or mistaken in your app's setup.

What does heroku buildpacks return for your app?

What does heroku config return for your app? (Please redact any secrets)

Which git branch are you deploying? And how are you deploying it? (git push or branch auto-deploy)

from create-react-app-inner-buildpack.

ecbrodie avatar ecbrodie commented on May 20, 2024

Hey @mars , thanks for the quick reply to my issue, especially on a Sunday!

I will point out that this bug does not appear to be related to deployment. There was an issue with how I was deploying my index.html file to production. I fixed that problem and the app can deploy successfully without unexpected 404 pages.

Rather, I think this bug is solely related to when I SSH into a Dyno via heroku ps:exec. It looks like the JS_RUNTIME_TARGET_BUNDLE variable is not being exported into the shell. Thus, that triggers this error message. Perhaps this is a bug, perhaps it is not a bug (maybe the Heroku platform does not inject configured environment variables when in an SSH session)?

Regardless, thank you for the help.

from create-react-app-inner-buildpack.

mars avatar mars commented on May 20, 2024

The ps:exec shell doesn’t get app config vars, because it’s not the app process. It’s a shell that is running in the container alongside the app process.

from create-react-app-inner-buildpack.

Aakratigoel avatar Aakratigoel commented on May 20, 2024

hey @ecbrodie , I am getting the same error , could you please tell me what did you fix in your index.html file
Thanks

from create-react-app-inner-buildpack.

ecbrodie avatar ecbrodie commented on May 20, 2024

@Aakratigoel I think it depends where you are getting the error. If it is during ps:exec, then I wouldn't worry. As @mars said, the shell doesn't get config vars injected, so I perceived from this that I should only treat this as an ignorable warning.

If you are getting this error during app deployment, then we got a different problem, which I think should be a new issue.

I can't remember exactly what I did to fix index.html, nor even if it is relevant to this issue anyway. Probably was just a bad path to the Webpack bundle. I encourage you to use Webpack's plugin for dynamically generating index.html files anyway.

from create-react-app-inner-buildpack.

VIPIN-creator avatar VIPIN-creator commented on May 20, 2024

@mars @ecbrodie I am also getting same error cannot access '/app/my/custom/path/js/*.js': No such file or directory
I have also tried heroku config:set JS_RUNTIME_TARGET_BUNDLE=/app/my/custom/path/js/*.js. But still getting same error.

on heroku config I am getting JS_RUNTIME_TARGET_BUNDLE: /app/my/custom/path/js/*.js

these are all the errors.

image

from create-react-app-inner-buildpack.

mars avatar mars commented on May 20, 2024

@VIPIN-creator /app/my/custom/path/js/*.js is not a valid path. That’s an example value from the readme. That value should be set to your own custom bundle path.

from create-react-app-inner-buildpack.

VIPIN-creator avatar VIPIN-creator commented on May 20, 2024

@mars thank you for the response. But Actually I don't know my custom bundle path.
image

above is the files in my build folder . please help me find out

from create-react-app-inner-buildpack.

mars avatar mars commented on May 20, 2024

@VIPIN-creator your file listing screenshot looks fine to me, using the standard CRA bundle path. I’m not sure what’s wrong for your app. It seems like the files are missing from the Heroku dyno. Did you follow the instructions in the README to set this up? Everything is documented there.

from create-react-app-inner-buildpack.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.