Find solutions to common issues and problems encountered during deployment and runtime of your MCP server.
npx @deploxy/cli deploy
, ensure your project is ready for publishing. Deploxy deploys your project as-is, so it must be fully built and configured correctly.
npm run build
or tsc
) to compile your code before deploying. Deploxy does not run your build script. It only installs production dependencies (e.g., npm install --production
) on the server.package.json
is Correct:
name
and version
are set for publishing to NPM.main
field points to the entry file of your built code (e.g., dist/index.js
).files
array includes your build output directory (e.g., ["dist"]
). This ensures your compiled code is included in the deployment.dependencies
should contain only what’s needed to run your server in production. Build tools like typescript
, eslint
, and bundlers should be in devDependencies
.npx @deploxy/cli deploy
as a direct replacement for npm publish
. Just as you would build your project before publishing to NPM, you must build your project before deploying with Deploxy.npx @deploxy/cli deploy
command.
401 Unauthorized
error.
Solution:
authToken
: Ensure the authToken
in your .deploxy.json
is correct and has not expired.package.json
could not be found, or other necessary files are missing.
Solution:
This almost always means your project was not built before deployment, or your package.json
is not configured to include the built files.
npm run build
).package.json
main
field: The main
field must point to the main file of your compiled output, not your source TypeScript or JavaScript file.
package.json
files
field: The files
array tells Deploxy which files and folders to include in the deployment. It must include your build output directory.
node_modules
, must be under 250MB.
devDependencies
: Ensure that build-time tools (like typescript
, @types/*
, eslint
, bundlers) are in devDependencies
and not dependencies
. Only dependencies
are installed on the server.npm-why
or yarn why
to find and remove unnecessary packages from your dependencies
.devDependencies
locally: Before deploying, you can simulate a production install to see the true size of your node_modules
. Create a temporary directory, copy your package.json
and package-lock.json
into it, and run npm install --production
..npmrc
file is present in the project root and contains a valid NPM token with publish permissions. The NPM_TOKEN
environment variable must be available in your shell.version
in your package.json
.name
in your package.json
is available on NPM and that you have permission to publish to that scope (e.g., @your-username/my-package
).injectedEnv
variable is a common cause of runtime failure. Go to your project’s Settings tab to verify the environment variables for each region. Remember that any changes require a new deployment to take effect.undefined
process.env.MY_VARIABLE
is undefined
.
Solution:
.deploxy.json
: Verify that the variable is defined in the injectedEnv
section and that its value is a string.injectedEnv
values after you run npx @deploxy/cli deploy
again..deploxy.json
and package.json
files.