Kill-port not found

Hi,

I am trying to push my code with code:push to monday.com’s servers.
I made up and running the code with npx @mondaydotcomorg/monday-cli@latest scaffold run ./ quickstart-react. Then I had created a Feature on the app’s dashboard. But somehow it failed with the following error:

✖ There was an error deploying the application.
  ========== Logs ==========
  > monday-react-quickstart-app@0.0.1 start
  > npm run stop && concurrently "npm run server" "npm run expose"
  > monday-react-quickstart-app@0.0.1 stop
  > kill-port 8301 && kill-port 4049 && kill-port 4040
  sh: 1: kill-port: not found

kill-port is being executed on remote server since kill-port is installed on my local machine.

So this is the case and I am stuck.

1 Like

Hello there @apsimos and welcome to the community!

What kind of features does your app have?

Cheers,
Matias

Hey @Matias.Monday,

Thanks for your quick reply. My app has a board view feature not integration. But this is not the case I guess. On server side there is no kill-port binary. Normally it should not run the package.json file since there is generated js, css and html file.

Hi @Matias.Monday,

Is there any progress for this issue?

Thanks

Do you have kill-port in your devDependencies in package.json?

  "devDependencies": {
    "@mondaycom/apps-cli": "^2.1.1",
    ...
    "kill-port": "^2.0.1",
   ...
  }

If not, try:

npm i kill-port

Take a look at the example here:

Hi @dvdsmpsn,

This is my package.json file. I have added your npm package to package.json file. It does not work either.

{
  "name": "monday-react-quickstart-app",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "npm run stop && concurrently \"npm run server\" \"npm run expose\"",
    "build": "react-scripts build",
    "expose": "mapps tunnel:create -p 8301",
    "server": "react-scripts start",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "stop": "kill-port 8301 && kill-port 4049 && kill-port 4040"
  },
  "dependencies": {
    "@mondaycom/apps-sdk": "^2.1.2",
    "monday-sdk-js": "^0.5.0",
    "monday-ui-react-core": "^1.54.0"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@mondaycom/apps-cli": "^2.0.0",
    "concurrently": "^5.2.0",
    "cross-port-killer": "^1.2.1",
		"kill-port": "^2.0.1",
    "eslint-config-react-app": "^7.0.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "^5.0.1",
    "sass": "^1.54.8"
  }
}

@apsimos The quickstart-react sample cannot run on monday code by itself because it’s a client only code (single page application). monday code runs server side code, so if you want to run client code, you will need to either:

  1. Package it and upload as zip to our CDN
  2. Add your own server that runs on monday code and serves the static files

We released lately a new capability that you can try and start from, which creates a new fullstack application from a template, and it’s suited for deploying on monday code. You can do it by running:

mapps app:create -d <FOLDER-DIRECTORY>

1 Like

Hi @gregra

Building the app and uploading it to monday.com makes the trick. But I have followed the instructions that monday.com promotes. I think there is a UX problem. That is my thought.

Thank you for your help.

Thank you for the feedback @apsimos !

It has been shared with the team :grin: