Hello- Currently recieving an error when attempting to deploy a svelte vite app. Does anyone know what is needed to be altered to correct the error described below?
The code builds & runs successfully locally. When in the app it is set up to deploy from a github repo. The code builds succcessfully & then in the “Deploy logs” this is the error:
ERROR: failed to launch: determine start command: process type web was not found
in the package.json this is what the scripts sections looks like:
"scripts": {
"dev": "vite dev",
"build": "vite build",
"prod": "vite dev --host 0.0.0.0 --port 8080",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test:integration": "playwright test",
"test:unit": "vitest",
"postbuild": "node --experimental-json-modules ./generate-sitemap.js"
},
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hey!
The error “failed to launch: determine start command: process type web was not found” you’re encountering during deployment on DigitalOcean App Platform is generally related to the absence of a specific start command in your
package.json
. This start command is needed for the platform to understand how to run your application after it’s been built.In the context of deploying a Svelte Vite app, your
package.json
scripts section is missing a “start” script which is necessary for DigitalOcean App Platform to know how to initiate your application. Currently, your scripts are focused on development, building, and testing.To resolve this issue, you should add a “start” script in your
package.json
which specifies the command to run your application in production. For example, if you’re using Node.js, this could be a command that starts your server file. Here’s an example modification for yourpackage.json
:Replace
your-server-file.js
with the appropriate entry file for your application. This tells DigitalOcean’s App Platform how to run your app after it’s built.Let me know how it goes!
Best,
Bobby