I have written a small application in AngularJS, which works fine on my local environment, now I'm deploying to Heroku. But Heroku can't find my app. I must be missing a vital part needed to specify the build and deployment details. So what is needed to run an angular app on Heroku?
Here's what i've done so far:
Used NPM to create a package.json file in the root of my project
created a Procfile in the root of my package, specifying my app :
web node app.js
added an angular buildpack to Heroku (https://github.com/nknj/heroku-buildpack-yo-angular.git works great)
when I use the Heroku CLI, for example heroku restart to refresh my dyno (and bear in mind i am running this from WITHIN the project root folder, so I shouldn't have to specify app name) I get the following error:
▸ Error: No app specified
▸ Usage: heroku restart [DYNO] --app APP
▸ We don't know which app to run this on.
▸ Run this command from inside an app folder or specify which app to use with --app APP
▸
▸ https://devcenter.heroku.com/articles/using-the-cli#app-commands
Heroku can't find my app. Why? How does one tell Heroku how to bootstrap the app?
Thanks.
Related
I've been trying to deploy the default shopify rails+react app generated via shopify cli
Deployment is successful but the UI doesn't get rendered. I get a blank screen with the message "This app does not appear to be loading and may be outdated. Try reloading the app in the legacy admin or contact the app's developer to update the app."
The same issue persists when I load the app in legacy admin (.myshopify.com/admin instead of admin.myshopify.com/)
For now, I've tried the following:
Running the Dockerfile locally
Run all commands from Dockerfile locally - bundle install, npm install, rake build:all and rails server -b 0.0.0.0 -e production
Deploy the app to production on cloud66 (which runs the default Dockerfile)
All 3 have the same issue. Don't see any errors in Rails logs as well.
Can anyone help please?
Turns out I missed RAILS_SERVE_STATIC_FILES flag as mentioned here. Not sure why it needs to be added explicitly, but it worked after I added it!
Issue: I'm trying to deploy my react js project on iis and it just loads a blank page.
Info: In order to deploy application, I ran npm run build to create a production build and then set up the site through IIS pointing to build folder. From debugging mode in the browser it looks like its not loading some of the js files:
Screenshot of Errors: https://imgur.com/axoyXk6.jpg
Does anyone have any tips on how to solve this issue?
Solution :
Delete current production build folder
Add "homepage": ".",
in the package.json file as advised in stackoverflow.com/q/55568697/6281832 .
Open a cmd and type "npm run build" to create a new production build
Deploy build as indicated in React Deployment on IIS server
Enjoy your live site :)
I have built a react app using a truffle box that uses create-react app. I can get the app running on my local host but I can't see it on my VPS when I go to the IP address of my VPS and I run exactly the same commands and I get the same output in the terminal. I go in to my client dir and run npm start. I have tried to make a build and run the build through an http server in the client dir and the root folder of the VPS.
I run
serve -s build
All I can see is the index of the build in the browser when I try and serve the build through a webserver. When I run npm start on my localhost I can view my app but it doesn't work on my VPS. Please help me I've been struggling with this for days and its the last part of my project.
You need a webserver in any case.
When you do a local development, you do use webpack dev server (which is inside of create react app).
For the production, you need to make a production build and serve it for example by nginx. Here some details how to create production build with CRA https://create-react-app.dev/docs/production-build
On your screenshot, you don't see your site, because there is no entry point in your folder. By default it should be index.html
I want to Deploy my react site to the regular server without build command
without Netlify or DigitalOcean, Heroku, GitHub Pages, aws
Is there a way to run modular bundlers like Webpack on Host?
actually what Netlify or DigitalOcean, Heroku, GitHub Pages, aws doing for show webpage without npm run build command?
I have created a simple react app and built the app using npm run build command and uploaded it to host. it works but whole application directory is visible in web browser console. So how do i fix it to not to show web directory on web console. Once the application kept growing and sensible data will visible. So is there any method to avoid that.
Here's the on cPanel File Manager
and js directory has minified js like this,
But once it loads on web browser it shows App.js content,
Any suggestions.
After running "npm run build" , publish your "build" folder. Not your "public" folder.