backstage: Backend won't start with fresh app created with npx @backstage/create-app@latest
📜 Description
Created an app with npx @backstage/create-app@latest without any issues backend won’t start with yarn dev backend won’t start with yarn workspace backend start
Same errors for both (see actual behavior).
👍 Expected behavior
frontend and backend start without errors
👎 Actual Behavior with Screenshots
Backend fails to start with
~/src/test$ cd test-app && yarn dev
yarn run v1.22.19
$ concurrently “yarn start” “yarn start-backend”
$ yarn workspace app start
$ yarn workspace backend start
$ backstage-cli package start
$ backstage-cli package start
[1] (node:5115) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
[1] (Use node --trace-warnings ... to show where the warning was created)
[0] Loaded config from app-config.yaml
[0] fatal: not a git repository (or any of the parent directories): .git
[0] WARNING: Failed to read git commit, ExitCodeError: Command ‘git rev-parse HEAD’ exited with code 128
[0] fatal: not a git repository (or any of the parent directories): .git
[0] WARNING: Failed to describe git version, ExitCodeError: Command ‘git describe --always’ exited with code 128
[0] [webpack-dev-server] Project is running at:
[0] [webpack-dev-server] Loopback: http://localhost:3000/, http://127.0.0.1:3000/
[0] [webpack-dev-server] Content not from webpack is served from ‘/home/admin/src/test/test-app/packages/app/public’ directory
[0] [webpack-dev-server] 404s will fallback to ‘/index.html’
[0] [webpack-dev-middleware] wait until bundle finished: /
[1] node:fs:603
[1] handleErrorFromBinding(ctx);
[1] ^
[1]
[1] Error: EMFILE: too many open files, open ‘/home/admin/src/test/test-app/node_modules/qs/lib/stringify.js’
[1] at Object.openSync (node:fs:603:3)
[1] at Object.readFileSync (node:fs:471:35)
[1] at Object.N (/home/admin/src/test/test-app/node_modules/@esbuild-kit/cjs-loader/dist/index.cjs:1:897)
[1] at Module.load (node:internal/modules/cjs/loader:1119:32)
[1] at Module._load (node:internal/modules/cjs/loader:960:12)
[1] at Module.require (node:internal/modules/cjs/loader:1143:19)
[1] at require (node:internal/modules/cjs/helpers:119:18)
[1] at <anonymous> (/home/admin/src/test/test-app/node_modules/qs/lib/index.js:3:17)
[1] at Object.<anonymous> (/home/admin/src/test/test-app/node_modules/qs/lib/index.js:11:1)
[1] at Module._compile (node:internal/modules/cjs/loader:1256:14)
[1] at Object.N (/home/admin/src/test/test-app/node_modules/@esbuild-kit/cjs-loader/dist/index.cjs:1:1077)
[1] at Module.load (node:internal/modules/cjs/loader:1119:32)
[1] at Module._load (node:internal/modules/cjs/loader:960:12)
[1] at Module.require (node:internal/modules/cjs/loader:1143:19)
[1] at require (node:internal/modules/cjs/helpers:119:18)
[1] at <anonymous> (/home/admin/src/test/test-app/node_modules/typed-rest-client/Util.js:13:12) {
[1] errno: -24,
[1] syscall: ‘open’,
[1] code: ‘EMFILE’,
[1] path: ‘/home/admin/src/test/test-app/node_modules/qs/lib/stringify.js’
[1] }
[1]
[1] Node.js v18.18.2
[0] webpack compiled successfully
👟 Reproduction steps
-
create an app… npx @backstage/create-app@latest
-
app creates fine
-
switch to app dir (test-app)
-
run yarn install
-
run yarn dev ERRORS
-
stop the app
-
run git init in app dir
-
run yarn dev again SAME ERRORS
-
stop the app
-
bump versions with yarn backstage-cli versions:bump
-
yarn install
-
run yarn dev again SAME ERRORS
📃 Provide the context for the Bug.
This is basic get started stuff that usually works.
🖥️ Your Environment
~/src/test/test-app$ yarn backstage-cli info yarn run v1.22.19 $ /home/admin/src/test/test-app/node_modules/.bin/backstage-cli info OS: Linux 5.10.102.1-microsoft-standard-WSL2 - linux/x64 node: v18.18.2 yarn: 1.22.19 cli: 0.23.0 (installed) backstage: 1.19.3
Dependencies: @backstage/app-defaults 1.4.4 @backstage/backend-app-api 0.5.7 @backstage/backend-common 0.19.8 @backstage/backend-dev-utils 0.1.2 @backstage/backend-openapi-utils 0.0.5 @backstage/backend-plugin-api 0.6.6 @backstage/backend-tasks 0.5.11 @backstage/catalog-client 1.4.5 @backstage/catalog-model 1.4.3 @backstage/cli-common 0.1.13 @backstage/cli-node 0.1.5 @backstage/cli 0.23.0 @backstage/config-loader 1.5.1 @backstage/config 1.1.1 @backstage/core-app-api 1.11.0 @backstage/core-components 0.13.6 @backstage/core-plugin-api 1.7.0 @backstage/e2e-test-utils 0.1.0 @backstage/errors 1.2.3 @backstage/eslint-plugin 0.1.3 @backstage/frontend-app-api 0.2.0 @backstage/frontend-plugin-api 0.2.0 @backstage/integration-aws-node 0.1.7 @backstage/integration-react 1.1.20 @backstage/integration 1.7.1 @backstage/plugin-api-docs 0.9.12 @backstage/plugin-app-backend 0.3.54 @backstage/plugin-app-node 0.1.6 @backstage/plugin-auth-backend-module-gcp-iap-provider 0.2.0 @backstage/plugin-auth-backend-module-github-provider 0.1.3 @backstage/plugin-auth-backend-module-gitlab-provider 0.1.3 @backstage/plugin-auth-backend-module-google-provider 0.1.3 @backstage/plugin-auth-backend-module-oauth2-provider 0.1.3 @backstage/plugin-auth-backend 0.19.4 @backstage/plugin-auth-node 0.4.0 @backstage/plugin-catalog-backend-module-scaffolder-entity-model 0.1.3 @backstage/plugin-catalog-backend 1.14.0 @backstage/plugin-catalog-common 1.0.17 @backstage/plugin-catalog-graph 0.2.37 @backstage/plugin-catalog-import 0.10.1 @backstage/plugin-catalog-node 1.4.7 @backstage/plugin-catalog-react 1.8.5 @backstage/plugin-catalog 1.14.0 @backstage/plugin-events-node 0.2.15 @backstage/plugin-github-actions 0.6.6 @backstage/plugin-graphiql 0.2.55 @backstage/plugin-org 0.6.15 @backstage/plugin-permission-common 0.7.9 @backstage/plugin-permission-node 0.7.17 @backstage/plugin-permission-react 0.4.16 @backstage/plugin-proxy-backend 0.4.4 @backstage/plugin-scaffolder-backend 1.18.1 @backstage/plugin-scaffolder-common 1.4.2 @backstage/plugin-scaffolder-node 0.2.7 @backstage/plugin-scaffolder-react 1.5.6 @backstage/plugin-scaffolder 1.15.1 @backstage/plugin-search-backend-module-catalog 0.1.10 @backstage/plugin-search-backend-module-pg 0.5.15 @backstage/plugin-search-backend-module-techdocs 0.1.10 @backstage/plugin-search-backend-node 1.2.10 @backstage/plugin-search-backend 1.4.6 @backstage/plugin-search-common 1.2.7 @backstage/plugin-search-react 1.7.1 @backstage/plugin-search 1.4.1 @backstage/plugin-tech-radar 0.6.9 @backstage/plugin-techdocs-backend 1.8.0 @backstage/plugin-techdocs-module-addons-contrib 1.1.1 @backstage/plugin-techdocs-node 1.9.0 @backstage/plugin-techdocs-react 1.1.12 @backstage/plugin-techdocs 1.8.0 @backstage/plugin-user-settings 0.7.11 @backstage/release-manifests 0.0.10 @backstage/test-utils 1.4.4 @backstage/theme 0.4.3 @backstage/types 1.1.1 @backstage/version-bridge 1.0.6 Done in 0.64s.
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn’t find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Are you willing to submit PR?
None
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 1
- Comments: 19 (8 by maintainers)
Using the -next release version recommended by @freben unfortunately did not work for me on my local machine.
I’m with WSL Ubuntu and this started ever since upgrading to the latest backstage version with the cli tool. More info can be found on your discord server where I wrote a message in support: https://discord.com/channels/687207715902193673/687235481154617364/1169164537723891782
Edit:
I was able to get backstage to run locally in WSL Ubuntu again by running these commands:
have upgraded the backstage to 1.20.3.I am using node 18.18.2.I am using Windows operating system: Since then, my local machine is unable to run the backend solution, here’s the error: yarn start-backend yarn run v1.22.19 $ yarn workspace backend start $ backstage-cli package start node:fs:603 handleErrorFromBinding(ctx); Error: EMFILE: too many open files, open ‘C:\myWorkspace-backstage\node_modules@immobiliarelabs\backstage-plugin-gitlab-backend\node_modules@backstage\backend-app-api\node_modules\fast-xml-parser\src\xmlparser\XMLParser.js’ at Object.openSync (node:fs:603:3) at Object.readFileSync (node:fs:471:35) at Object.j
I’m thinking my issue is different. Note the reference to EMFILE: too many open files, open I suspect es-buildkit is causing the number of file descriptors on my WSL Debian distro to be exceeded. I’ve been unable to up the limits as a work around trying several methods. I’m still stuck.
I updated my v1.19.3 build to use backstage-cli@0.24.0-next and ‘yarn dev’ no longer hangs on starting the backend.