getting error Invalid service name when deploying Node.js application through github repo
nitin26gupta
PROOP

a year ago

I am trying to deploy my node.js application, and I am getting error : Invalid Service Name when deploying.

this is the github repository:
https://github.com/nitin26gupta/frontend-interior-design-transformation-stability-diffusion-api

Not sure, what wrong I am doing here.

and this is the package.json file:

{
  "name": "interior-design-api",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@emotion/react": "^11.13.3",
    "@emotion/styled": "^11.13.0",
    "@mui/material": "^5.16.7",
    "axios": "^1.7.7",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "tailwindcss": "^3.4.15"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

1 Replies

brody
EMPLOYEE

a year ago

When you deploy a service Railway will create a service name from the repo name, and the repo name being longer than the allowed 32 characters is what is causing the issue.

To get around this, you can deploy an empty service, and then attach your repo in its service settings.

Additionally, if you deploy that repo as-is, you will most likely be deploying a development server.

https://github.com/brody192/create-react-app-starter

Copy the nixpacks.toml and Caddyfile from this repo into yours.


Loading...