I'm very new to using heroku. I deployed one of my projects on heroku : https://grace-barker-fsa.herokuapp.com/home
Everything seems to be working fine but my pictures aren't loading. The images are from dogapi.com and seeded into my database:
This is what my config vars looks like on the heroku app:
And this is what my package.json looks like :
when I run heroku run npm run seed in my terminal, I get this error:
There's not much online that helps me fix this issue, and Heroku support is really bad.
Any helpful tips will be greatly appreciated, I've tried everything and still cant figure it out.
Thanks in advance
Related
I just completed a MERN application following a great guide but it doesn't cover deployment. I am currently unsuccessful deploying, getting 'Application Error' at this link: https://enigmatic-castle-43725.herokuapp.com/
Here is the link to the git repo: https://github.com/Sciphr/Project-Manager
I have set up a 'heroku-postbuild' script with the following commands:
"NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
My project setup is using Create-React-App in a 'client' folder, and then building the express server in a 'server' folder. I have the environmental variables setup in Heroku, and at one point the page loaded (just not the data from the GraphQL queries), but now it is back to 'Application Error'
I have a strong feeling the issue is with my index.js file in the 'server' folder, but I can't seem to understand exactly where the issue is. Thanks for any/all help anyone can give me, it really is appreciated. Cheers!
Alright everyone who potentially saw this, my apologies as I did find the issue. This was my first time using GraphQL and I did not at all remember about the ApolloClient instance created in App.js, as that was the one place where you type out a specific URL. I also changed the position of my dotenv dependency from devDependencies to dependencies.
So before the uri was set to 'https://localhost:5000/graphql', which naturally I have now changed to my properly deployed link. Guess it would make sense to make it an ENV variable anyway.
Anyways thanks Chris sorry to take your time!
I have worked on an organization whose entire account was deleted by mistake but was later restored. Now I am trying to deploy a project in this org with gh-pages. Everything works or seems fine like to commits and all, unless I try to deploy the project. When I run the command npm run deploy the feedback I get is "published". But when I go to github and look for the website it says Error 404.
I have looked into the deployment log and found
this
I have tried every possible way to deploy a project using gh-pages and I have followed its procedure carefully. I found nothing useful which can solve this issue.
Thankyou in advance.
I am trying to update my react portfolio but to do that i have to be able to work on it. I have it up on heroku working and online. I pulled it up on my code editor and I do npm start and it compiles successfully but it wont go onto my localhost. Im wondering if anybody has an idea of why it wont come up. thanks a bunch
i think you can put your project in github and uplaod it to heroku through your repository and then you can change you code , run it in localhost and changes will automatically get applied to your protfolio online
I am running npm run deploy command but it is stopping after 2 lines without any error and files are not getting updated. I have hosted website on s3. Snapshot shows the 2 lines. It was working fine before. Something happened suddenly. Thanks in advance for the help.
Restarting pc solved it. I don't know how.
I have react web app running locally on my machine now I want to put this on heroku.I know before publishing it globally I need to run.
npm run build
In order to generate production ready code.My question is what if after generating production code and pushing it to heroku if I change something in react code so again do I need to run npm run build command before pushing it to heroku.
Someone please clear my doubt. Any help would be appreciated.
THANKS
Yes, you would need to build again. However, it would be a shorter time span the next time.