I created a Dockerfile following the steps in https://backstage.io/docs/deployment/docker/#multi-stage-build
When running the Dockerfile at the root "docker image build -t backstage .", I m getting the error below. I confirm that index.ts exists in packagesackendsrc folder.
> [build 9/10] RUN yarn build:backend --config ../../app-config.yaml:
#18 0.618 yarn run v1.22.19
#18 0.646 warning Skipping preferred cache folder "/home/node/.cache/yarn" because it is not writable.
#18 0.646 warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
#18 0.662 $ yarn workspace backend build --config ../../app-config.yaml
#18 0.834 warning Skipping preferred cache folder "/home/node/.cache/yarn" because it is not writable.
#18 0.834 warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
#18 1.095 warning Skipping preferred cache folder "/home/node/.cache/yarn" because it is not writable.
#18 1.096 warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
#18 1.108 $ backstage-cli package build --config ../../app-config.yaml
#18 2.601
#18 2.601 Error: Error: Could not resolve entry module (src/index.ts).
#18 2.601
#18 2.601
#18 2.624 error Command failed with exit code 1.
#18 2.624 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#18 2.643 error Command failed.
#18 2.643 Exit code: 1
#18 2.643 Command: /usr/local/bin/node
#18 2.643 Arguments: /opt/yarn-v1.22.19/lib/cli.js build --config ../../app-config.yaml
#18 2.643 Directory: /app/packages/backend
#18 2.643 Output:
#18 2.643
#18 2.643 info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
#18 2.660 error Command failed with exit code 1.
#18 2.660 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.