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

Broken Docker image on fresh build #1460

Open
timolegros opened this issue Dec 26, 2024 · 2 comments
Open

Broken Docker image on fresh build #1460

timolegros opened this issue Dec 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@timolegros
Copy link

timolegros commented Dec 26, 2024

Describe the bug

Built Docker image (pnpm docker:run) fails to start - exits with the following error:

2024-12-26 07:24:12 /app/agent:
2024-12-26 07:24:12  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @elizaos/[email protected] start: `node --loader ts-node/esm src/index.ts "--isRoot"`
2024-12-26 07:24:12 Exit status 1
2024-12-26 07:24:12  WARN   Local package.json exists, but node_modules missing, did you mean to install?
2024-12-26 07:24:12 (node:31) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
2024-12-26 07:24:12 --import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
2024-12-26 07:24:12 (Use `node --trace-warnings ...` to show where the warning was created)
2024-12-26 07:24:12 (node:31) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
2024-12-26 07:24:12 (Use `node --trace-deprecation ...` to show where the warning was created)
2024-12-26 07:24:12 
2024-12-26 07:24:12 node:internal/modules/run_main:122
2024-12-26 07:24:12     triggerUncaughtException(
2024-12-26 07:24:12     ^
2024-12-26 07:24:12 Error: Cannot find package '@elizaos/adapter-postgres' imported from /app/agent/src/index.ts
2024-12-26 07:24:12     at packageResolve (/app/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:757:9)
2024-12-26 07:24:12     at moduleResolve (/app/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:798:18)
2024-12-26 07:24:12     at Object.defaultResolve (/app/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:912:11)
2024-12-26 07:24:12     at /app/node_modules/ts-node/src/esm.ts:218:35
2024-12-26 07:24:12     at entrypointFallback (/app/node_modules/ts-node/src/esm.ts:168:34)
2024-12-26 07:24:12     at /app/node_modules/ts-node/src/esm.ts:217:14
2024-12-26 07:24:12     at addShortCircuitFlag (/app/node_modules/ts-node/src/esm.ts:409:21)
2024-12-26 07:24:12     at resolve (/app/node_modules/ts-node/src/esm.ts:197:12)
2024-12-26 07:24:12     at nextResolve (node:internal/modules/esm/hooks:748:28)
2024-12-26 07:24:12     at Hooks.resolve (node:internal/modules/esm/hooks:240:30)
2024-12-26 07:24:12 
2024-12-26 07:24:12 Node.js v23.3.0
2024-12-26 07:24:12  ELIFECYCLE  Command failed with exit code 1.

You can fix this issue by running pnpm install --no-frozen-lockfile before executing pnpm docker:build but the installed dependencies should not affect the image build process.

To Reproduce
Prerequisites:

  • Ubuntu/Debian
  • Docker installed
  • PNPM installed
  • Repo cloned
  • main branch checked out
  1. pnpm clean
  2. pnpm docker:build
  3. pnpm docker:run
  4. docker logs eliza

Expected behavior

The container should not exit with a dependency error and should start as normal regardless of whether pnpm install was executed before pnpm docker:build.

Screenshots

Additional context

Possibly related to: #1120 and #1352

@timolegros timolegros added the bug Something isn't working label Dec 26, 2024
@HashWarlock
Copy link
Collaborator

I assume this is an amd64 cpu? I will try to reproduce and see what is wrong here.

@timolegros
Copy link
Author

I assume this is an amd64 cpu? I will try to reproduce and see what is wrong here.

Yes. i7-12700H - Ubuntu 22.04.5
Also tried on Intel Xeon Platinum 8000 series - Ubuntu 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants