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?
Related
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
I am trying to sign the plugin I am working on, but no matter what I have tried it always says grafana is unable to load it because it is “modified”.
I made a brand new backend datasource plugin, ran the basic yarn install and build commands, then the go and mage commands from the readme, then signed it using the docs procedure for the private key, and nothing else. Still says its modified.
Even checked that the hashes of the files in the manifest were the same as what the manifest had, but no matter what it is always marked as modified.
Discovered and fixed the issue. So the issue was with an img/logo.svg path being "", but I couldn’t modify it in the manifest file by hand after the signature process since that would make it invalid. And resigning would make the \ appear again. So the simple fix is removing the img folder and moving the logo.svg to the /src folder with the other files. Made the change in the logo paths set in the src/plugin.json as well. Then when plugin is signed the manifest file just has logo.svg instead of img\logo.svg and it passes and is viewable from grafana dashboard.
Here is a link to the grafana forum post where we went through this issue in more detail: https://community.grafana.com/t/signed-backend-plugin-keeps-throwing-modified-signature-error/39687
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.
i'm getting
##[error]Error: File entry unexpectedly large: 38749 (max: 4096)
when try to deploy using azure web app
Please refer to this wiki:
But, Web packages created using MSBuild task (with default arguments)
has a nested folder structure that can only be deployed correctly by
Web Deploy. If Run From Package is used for the above packages, the
web package would be copied without honoring the nested folder
structure and can cause runtime issues.
For if you want to deploy the package which generated from MSBuild / VSBuild, please try with executing Archive files task after MSBuild / VSBuild task. So that the file which has a nested folder structure can be deployed with Web app deploy task correctly.
So far i solve my problem by downsize the actual project size by deleting old files i think the project should be less then 2GB as mentioned here
I get the following warning when deploying an application with matlab:
[Warning: Your deployed application may error out because file or folder paths
not present in the deployed environment may be included in your MATLAB startup
file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
determine the appropriate execution environment when including file and folder
paths, and recompile your application.
]
I have tried to reduce my application to merely a program that creates a figure, nothing more, and I still get the message.
Note: When I start my application, I get the splash screen and then it crashes.
I have tried deploying with R2016b, R2017a, R2017b. How do I get around this? I have tried using my own startup file, I have used isdeployed as suggsted. Nothing seems to work.
All help appreciated!
Type which startup.m -all in your command window. If you find the file then delete it from the path. Then perform the build process again. It might work.