simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

Emulator fails with repeated error message: Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. #115

Closed syamanashi closed 1 year ago

syamanashi commented 1 year ago

Development environment:

Monorepo Dependencies:

"dependencies": {
    "@simondotm/nx-firebase": "^1.1.0-beta.0",
    "axios": "^1.0.0",
    "firebase": "^9.14.0",
    "firebase-admin": "^11.3.0",
    "firebase-functions": "^4.1.0",
    "tslib": "^2.3.0"
  },
  "devDependencies": {
    "@nx/devkit": "16.1.4",
    "@nx/esbuild": "16.1.4",
    "@nx/eslint-plugin": "16.1.4",
    "@nx/jest": "16.1.4",
    "@nx/js": "16.1.4",
    "@nx/linter": "16.1.4",
    "@nx/node": "^16.1.4",
    "@nx/workspace": "16.1.4",
    "@types/jest": "^29.4.0",
    "@types/node": "~18.7.1",
    "@typescript-eslint/eslint-plugin": "^5.58.0",
    "@typescript-eslint/parser": "^5.58.0",
    "esbuild": "^0.17.17",
    "eslint": "~8.15.0",
    "eslint-config-prettier": "8.1.0",
    "firebase-functions-test": "^0.2.0",
    "firebase-tools": "^11.16.1",
    "jest": "^29.4.1",
    "jest-environment-node": "^29.4.1",
    "kill-port": "^2.0.1",
    "nx": "16.1.4",
    "prettier": "^2.6.2",
    "ts-jest": "^29.1.0",
    "ts-node": "10.9.1",
    "typescript": "~5.0.2"
  }

Steps to reproduce:

  1. $ npx create-nx-workspace@latest
    ✔ Choose what to create                 · integrated
    ✔ What to create in the new workspace   · apps
    ✔ Repository name                       · simondotm-test
    ✔ Enable distributed caching to make your CI faster · No
  2. $ cd simondotm-test
  3. $ npm i @simondotm/nx-firebase
  4. $ nx g @simondotm/nx-firebase:app admin-functions
    Error:  >  NX   Cannot find module '@nx/node'
  5. $ npm i @nx/node@latest --save-dev
  6. $ nx g @simondotm/nx-firebase:app admin-functions
  7. $ nx emulate admin-functions
    
    > nx run admin-functions:emulate

Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. Could not kill process on port 9099,5001,8080,9000,5000,8085,9199,9299,4000,4400,4500. No process running on port. /bin/sh: dist/apps/admin-functions/.runtimeconfig.json: No such file or directory Warning: run-commands command "firebase functions:config:get --config firebase.json > dist/apps/admin-functions/.runtimeconfig.json" exited with non-zero status code

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Ran target emulate for project admin-functions (11s)

✖    1/1 failed
✔    0/1 succeeded [0 read from cache]
simondotm commented 1 year ago

Hi, thanks for reporting, I'll take a look. 👍

simondotm commented 1 year ago

@syamanashi Please could you try nx serve admin-functions instead? I believe that will work as expected.

simondotm commented 1 year ago

Closing this, due to v2 release. Please report back if any further issues.