Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing package json when spinning up the game_controller #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wantsui
Copy link
Contributor

@wantsui wantsui commented Jun 6, 2024

What does this PR do?

Fix the rolldice-game app.

Motivation

When I try to spin up the app in apps/rolldice-game/, the game_controller container fails to spin up with this error:

Error: Cannot find module 'express'
Require stack:
- /game_controller/game_controller/controller.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
    at Function.Module._load (internal/modules/cjs/loader.js:774:27)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/game_controller/game_controller/controller.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/game_controller/game_controller/controller.js' ]
}

This has to do with how the Dockerfile currently copies files over.

The folder with the package.json is /game_controller/game_controller , not /game_controller.

After this fix, the following containers images should spin up:

  • rolldice-game-game_controller
  • rolldice-game-rolling
  • rolldice-game-scoring
  • otel/opentelemetry-collector-contrib

@wantsui wantsui requested a review from a team as a code owner June 6, 2024 18:56
@wantsui wantsui requested a review from mackjmr June 6, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant