Brand new AngularFullstack app won't deploy to Heroku - heroku

I'm having trouble deploying my app to Heroku. I don't have this issue with an app I started several months ago so I think it must be something wrong with the lastest Angular Fullstack. After several hours of trouble shooting I decided to start from scratch just to see if AngularFullstack would deploy if you create a completely fresh app in an empty directory.
I created the app in the terminal with:
yo angular-fullstack
Without doing anything else I deployed the app to Heroku by typing this in the terminal:
yo angular-fullstack:heroku
Finally I went to the Heroku webaddress and I get the following "Application Error":
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
When I look at the Heroku logs I get the exact same error I was getting in my finished project:
Error: ENOENT, no such file or directory '/app/dist/public/favicon.ico'
I've tried putting this file everywhere in my directory structure. There is no 'dist' in directory structure of the new app. I put this directory in the old app with grunt serve:dist but that doesn't fix the problem of locating favicon.ico even though it is there in the public folder. There is no 'app' directory at the top however and it begins looking all the way in my Mac 'User' path. I think this part of the problem that I don't know how to fix.

Related

Moving Google Firebase Project from Old PC to New PC

I had configured my old laptop with firebase-cli to upload my website to Google Cloud Hosting.
Now I got the new laptop and trying to configure the new laptop with firebase-cli. I have installed all required tools for firebase. I transferred the source code from my old laptop to new laptop.
But when I try to deploy code from new laptop by using following command:
firebase deploy --only hosting:myfirstproject
there is an error that myproject is not found in firebase.json
I changed firebase.json from myproject to myfirstproject.
but it is still not working.
I tried using the following command
firebase -P project-id init hosting
This command responds that make sure you have permission to access it.
Can someone guide what is to be done for moving project from old pc to new pc.
Thanks.
I changed firebase.json file as per project name showing in google console. but it is not working and giving the same error that myproject is not in firebase.json
After Lot of testing, I am able to resolve my issue. There was an error that myproject was listed in firebase.json.
So, I made changes to firebase.json outside "public" directory of my project.
I added
"site": "myproject",
to my firebase.json and restarted the laptop.
Then issued command
firebase deploy --only hosting:myproject
and
It worked flawlessly.
Thanks everyone.

Deploying Strapi to Heroku

I've been following the official Strapi tutorials on how to develop and deploy an application to Heroku and it seems you have to configure some files like ./config/environments/**/database.json.
The problem is that, installing the app without --quickstart (yarn create strapi-app my-project), my config folder just has a functions folder and database.js and server.js files.
Should I create manually this database.json or is this supposed to be created automatically when initializing the app without --quickstart?
I was also confused so I manually created the folders /environments/production and inside the file database.json and it worked for me.
Link to the docs: https://strapi.io/documentation/3.0.0-beta.x/deployment/heroku.html#_4-update-your-database-config-file

Angular Console: Can't create library

I'm trying to create a new library using v 8.1.0 of the Angular Console on Windows. The error I get is "ENOENT: no such file or directory, mkdir "c:\path\to\my\workspace\libs\new_library_name"
"c:\path\to\my\workspace\libs" exists already
new_library_name folder should be created by Angular Console
The command run by the console is ng generate #nrwl/angular:library new_library_name.
I've tried different names/paths, running as administrator, running inside VSCode and in the standalone console. No luck with anything. This used to work.
Also, if I create the folder c:\path\to\my\workspace\libs\new_library_name and then run the console again, I get an error ENOENT: no such file or directory c:\path\to\my\workspace\libs\new_library_name\ReadMe.md. Of course the ReadMe doesn't exist - it needs to be created by the console.
What am I doing wrong or where to look?
Problem solved. I had turned on Controlled Folder Access in Windows 10 and mistakenly included my project folder as a controlled folder, which prevented applications (Angular Console, Yarn, etc) from writing to the folder. Removed it from Controlled Access and all is working again.

Unable to troubleshoot heroku log message No web processes running

I pushed my flask app to Heroku and I'm trying to connect through my frontend for the first time. I was getting a 503 Error and did a heroku log which revealed
desc="No web processes running".
I double checked my Procfile, deleted it, saw that git was noticing the changes to the file, made sure there was no extension to the file, then recreated it and pushed it back to heroku and ran heroku ps:scale web=1 but I'm still getting
Couldn't find that formation.
Is there anything else I should try?
This is what I have inside the Procfile web: gunicorn manage:app. I'm creating the Procfile on TextEdit, could that be causing the issue?
This might be obvious to others, but it took me a while to figure it out. I was using TextEdit on my Mac to create the Procfile. I made sure to delete the extension after creating the file. Apparently, thats not good enough. I went into google drive and created a Procfile.txt then downloaded it to my apps root directory and removed the extension. Pushed the changes and ran heroku ps:scale web=1 and it worked.

Parse Dashboard - works locally, blank on Heroku

I am running Parse dashboard locally - works fine
Deployed to Heroku (see references below) - it runs but does now load anything (blank screen). No errors in the log - app is up and running.
I have tried to deploy based on the following links:
Stackoverflow
Codementor
The issues came down to the bundles/ directory not being pushed correctly to git (and thus Heroku).
Make sure you run 'npm install' on your local directory
Make sure you add/commit the entire directory to git.

Resources