In my environment gcloud app browse opens wrong directory.
Most probably my old config remain somewhere. How can I change it? Where the URI info is saved?
Related
After working on my React project, I run npm start but my google chrome browser does not start automatically.
I manually write "http://localhost:3000" are there any solutions???
Wrong URL
localhost://3000 is wrong, it should be http://localhost:3000
Auto launch
If you're trying to get Create React App to open the dev page automatically, you may need to set your browser explicitly. Look at the environment variable called BROWSER in the Create React App config. It will look like this BROWSER=chrome, and you can put this in the .env file at the root of your directory. chrome might not be the right value, check documentation.
If the browser doesn't automatically launch, there may be an issue with your OS
concerning the execution of an application developed with react js if I type npm start; the execution does not start automatically; the terminal shows me the url that I must type and I write it manually in my browser. and I notice that a similar problem occurs when I type herroku login if I want to deploy a project. I think there is a problem with my browser
enter image description here
I want to host my app on firebase.
I followed these steps.
npm run build and it created build folder
firebase init, select hosting,
What do you want to use as your public directory? build
Configure as a single-page app (rewrite all URLs to /index.html)?
Yes
File build/index.html already exists. Overwrite? No
and then finally firebase deploy
after some time I see files uploaded successfully and in the firebase hosting dashboard it shows files uploaded something like 727. but the app looks something like a welcome message "Welcome Firebase Hosting Setup Complete. You're seeing this because you've successfully set up Firebase Hosting. Now it's time to go build something extraordinary!"
however, if I create a react app using create-react-app, and follow the same steps, it's working fine at the same URL and host. it displays the app at once without a problem.
my firebase.json
Firsty once you deploy it try viewing it on incognito mode as sometimes due to the cache it renders the same page
now still if you have errors follow this steps given in the link I followed this and got mine online
https://www.youtube.com/watch?v=IDHfvpsYShs&t=337s
I have been working on a website and I decieded to use google app engine to host it. I have been able use the config file to try and deploy with no errors in the config. I am using the google cloud SDK to upload and deploy my files. Whenever I try to deploy the SDK says it is uploading 30,000 files. I only have 11 files I need to upload. I think the SDK is trying to upload itself to cloud storage. My website files are in a www subfolder under my public directory where the SDK is installed. On my old computer I was able to move all the SDK files to my home directory and use my public folder as the sourse. When I try to do that now it says gcloud is not found. I am using gcloud app deploy and running windows 11. My old computer was running windows 10. I am not sure if that matters. I am also not sure if I need to specify anything in my app.yaml file. If anyone could help that would be great.
This is my app.yaml file:
runtime: php74
handlers:
- url: /www/index.html
static_files: /www/index.html
upload: /www/index.html, /www/campsite-form-results.php, /www/contact_us.php
This is the command line screenshot:
Plese let me know if there is any other information need to add.
This is expected since gcloud will upload everything that is in the path where is the app.yaml file.
I suspect that C:/Users/evanh/public contains a lot of things (even hidden folders) and not only your files for the app.
Create a new folder and put there your code, then try to deploy the app from that new folder.
EDIT
Since this was the accepted answer I'm editing this to include John's suggestion using his answer:
As a good practice, create a .gcloudignore file and specify what you do not want uploaded. You can see more info here:
gcloud topic gcloudignore
Ignoring files
Create a .gcloudignore file and specify what you do not want uploaded otherwise everything is uploaded.
gcloud topic gcloudignore
Ignoring files
Today i've deployed my client react app to Azure App Service. The problem is, that instead of displaying site im interested in, it returns structure of wwwroot. Even if I change directory to /src/App.js it return code of the App. What is the problem?
When you run a node application on Windows Azure Web Apps, IIS is used as the webserver together with iisnode and most likely some configuration is wrong so IIS doesn't know what to start. I'd suggest to let Azure handle the creation of the web.config and you don't touch it unless you know what you're doing:
Create a file .deployment with the following content
[config]
SCM_DO_BUILD_DURING_DEPLOYMENT = true
Put the .deployment file as well as the content of your React app (don't include web.config, you also don't have to include the node_modules folder, Azure will handle this as SCM_DO_BUILD_DURING_DEPLOYMENT is set to true) into an upload.zip file.
Delete the content of /wwwroot in Azure
Run az webapp deployment source config-zip -g <ResourceGroupName> -n <AppServiceName> --src upload.zip
A new web.config should get created which should contain a handler for server.js which will be the file to be served by Node.js.
This is solved. Thanks to #azium
The only thing i needed to do is run
npm run build
in local before deployment
This is the first time I am deploying something on cloud, and I followed article.
I have created application, and want to deploy it on Google Cloud. While doing it I am getting error for app.yaml file.
My app.yaml is,
When I execute "ls" command, it display only 1 file,
The problem is that the command gcloud app deploy is unable to find your application app.yaml file.
If you do not provide any argument to gcloud app deploy it will look for an app.yaml file in the current directory.
It seems for your screenshot that you are in the Cloud Shell home directory, one directory above the one that contains your code and the actual app.yaml file, the one named xxxx-point-gcp.
Please, either change the working directory to xxxx-point-gcp and then run gcloud app deploy, or run gcloud app deploy passing as argument the full path to the app.yaml file:
gcloud app deploy ~/xxxx-point-gcp/app.yaml
Please, substitute the xxxx placeholders for the appropriate paths.
Please, see the relevant documentation.
You need to run gcloud app deploy from the folder which contains app.yaml file.