App Service deploy of NODE JS app fails with web.config error - azure-devops

I am deploying a NODE JS app to an Azure App Service using Azure Devops pipelines, but it failes with the following error
##[error]Error: Failed to generate web.config. Error: ENOENT: no such file or directory, open 'D:\a\_temp\temp_web_package_09902550774824137\web.config'
But in my deploy step I have the generate web.config step so I am not sure why its not working?

Thanks for asking question! You may try below steps for troubleshooting the issue.
Check that the application is listening on the port provided by the PORT environment variable: process.env.PORT. You may use the WEBSITES_PORT app setting set to port.
Also,review the web.config and make sure the name of the main script file in the handlers section matches the main script file and the Web.config configuration for settings names/values.
Check that the nodeProcessCommandLine setting to ensure that the Node.exe is available at the correction location.
Also, In order for Kudu to detect a Node.js app, you need a package.json file and an app.js/index.js in the root of your folder. It's recommended to correctly set the start script in the package.json file https://docs.npmjs.com/misc/scripts#default-values
If the deployment steps run correctly, however, the app fails to start due to a missing npm package, note that only "dependencies" are installed, "devDependencies" are not installed by default.Try viewing the logs to fetch more details.

Related

Disable .vscode-server/data/user/history caching

i use nextjs in vscode and every time i build my app with
npm run build
the buildId and old build path are saved in .vscode-server/data/user/history I want to disable this because for some reason my nextjs app uses that old info sometimes and changes my new build on itself what results in a 404 error for the buildManifest.js file. This is because it uses the old folder name but the folder has a different name (generated with npm run build). I do this with SSH to my raspberry pi. Let me know! Thanks.

Vercel is changing the contents of js file on deployment

I am trying to deploy a mern app on vervel using the vercel serverless functions. The idea is that the backend will be used for serving the file present inside build folder in frontend. But, after deployment, I am constantly getting the the error:
Going to the sources, we can see the line which is causing the error:
Now, when I check the same file in my build folder, I see that there are no such lines present in the code. In fact, the code in that file in my build folder starts from line 8 of above image.
This means vercel has added the few initial lines by itself, which caused the error.
Why has it done that? And what is the solution for that?

Why is the gcloud sdk's deploy command looking at my home directory for files?

I'm attempting to deploy a python server to Google App Engine.
I'm trying to use the gcloud sdk to do so.
It appears the command I need to use is gcloud app deploy.
I get the following error:
me#mymachine:~/development/some-app/backend$ gcloud app deploy
ERROR: (gcloud.app.deploy) Error Response: [3] The directory [~/.config/google-chrome/Default/Cache] has too many files (greater than 1000).
I had to add ~/.config to my .gcloudignore to get past this error.
Why was it looking there at all?
The full repo of my project is public but I believe I've included the relevant portion.
I looked at your linked repo and there aren't any yaml files. As far as I know, a GAE project needs an app.yaml file because that file tells GAE what your runtime is so that GAE knows how to deploy/run your code. In fact, according to the gcloud app deploy documentation, if you don't specify any yaml files to be deployed, it will default to app.yaml in the current directory. If it can't find any in the current directory, it will try to build one.
Your repo also shows you have a Dockerfile. GAE documentation for custom runtimes says ...Custom runtimes let you build apps that run in an environment defined by a Dockerfile... In the app.yaml file for custom runtimes, you will have the following entry
runtime: custom
env: flex
Since you don't have an app.yaml file and you have a Docker file in which you are downloading and installing Chrome, it seems to me that gcloud app deploy is trying to infer your runtime and this has led to it executing some or all of the contents of the Dockerfile before it attempts to then push it to Production. This is what is making it take a peek at the config file on your local machine till you explicitly tell it to ignore it. To be clear, I'm not 100% sure of this, just trying to see if I can draw a logical conclusion.
My suggestion would be to create an app.yaml file and specify a custom runtime. Or just use the python runtime with flex

when hosted a website shows system cannot find the file specified but work fine in debug mode

When publish a site in local IIS it shows an exception system cannot find the file specified. But same code work fine in debug mode is there any solution for this.
Read the path from web config file.
Check if the missing file is part of your project in the project explorer. If it is not part of your project, then it will not be published, but it nevertheless may work in debug mode, because the file(s) are locally available.

How to Deploy a JBoss ESB on a Jboss AS

I am Trying to deploy Jboss esb over Jboss AS using Ant. but i am getting the following error and it is giving me a build fail. I certainly have changed the .Properties file with the correct Server home and server config paths.
Below is the error i am getting
Also I have Jboss 5.1.0 AS and Jbossesb 4.1.0
I am not sure what changes do i need to make with my build.xml file.
C:\jbossesb-4.10\install>ant deploy
Buildfile: C:\jbossesb-4.10\install\build.xml
check.deploy.props:
dependencies.source:
dependencies.jbossesb:
dependencies:
init.bindings.props:
undeploy.bindings:
undeploy.jbossas5:
undeploy.jbossas6:
undeploy:
BUILD FAILED
C:\jbossesb-4.10\install\build.xml:480: Directory does not exist: C:\jbossesb-4.10\install\jboss-5.1.0.GA\server\all\lib
You've probably set bad server path in property file. Did you unpack server to "C:\jbossesb-4.10\install\jboss-5.1.0.GA\" directory?
You need to set the path to jboss-as directory. Correct may be something like this.
C:\jbossesb-4.10\install\jboss-5.1.0.GA\jboss-as\
In order to deploy jboss-esb on to jboss-as you need to have deployment.properties file in
your install folder of jboss-esb (for ex: \jbossesb-4.6\jbossesb-4.6\install)
in that deployment properties file you need to set your jboss-as home
ex: org.jboss.esb.server.home=D:/J Boss Book Installs/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA
NOTE: the direction of slash is very important it should be forward slash(/) (as specified in example above) for it get indexed in to the given server.home location .
Otherwise you will get directory doesn't exist errors just like the one you specified above in your question .
Check your deployment.properties file and correct server.home it would probably resolve your error !!!