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: Getting started instruction issues #3989

Open
madjin opened this issue Mar 19, 2025 · 11 comments
Open

fix: Getting started instruction issues #3989

madjin opened this issue Mar 19, 2025 · 11 comments
Labels
bug Something isn't working V2 Eliza 0.2.0

Comments

@madjin
Copy link
Collaborator

madjin commented Mar 19, 2025

npm install -g @elizaos/cli

Where Found

eliza-v2/test » npm install -g @elizaos/cli
npm error code ETARGET
npm error notarget No matching version found for @elizaos/plugin-sql@^0.25.6.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: /home/jin/.npm/_logs/2025-03-19T04_34_02_115Z-debug-0.log

Note, tested this too: eliza-v2/test » bun install -g @elizaos/cli
bun add v1.2.5 (013fdddc)
error: No version matching "^0.25.6" found for specifier "@elizaos/plugin-sql" (but package exists)
error: @elizaos/plugin-sql@^0.25.6 failed to resolve

Test on machine 2 (debian bookworm)

➜  test2 npm install -g @elizaos/cli
npm error code ETARGET
npm error notarget No matching version found for @elizaos/plugin-sql@^0.25.6.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: /home/jintern/.npm/_logs/2025-03-19T04_41_19_499Z-debug-0.log

npx elizaos start

Where Found

code/eliza-v2 » npx elizaos start

Version: 1.0.0-beta.0
Startup successful!
Go to the dashboard at http://localhost:3000

[2025-03-19 04:13:50] INFO: Using default Eliza character with all plugins
[2025-03-19 04:13:51] INFO: Plugin @elizaos/plugin-local-ai not installed, installing into /home/jin/code/eliza-v2...
bun add v1.2.5 (013fdddc)
  🔍 Resolving [1/66] [2025-03-19 04:13:51] INFO: Installing plugin: @elizaos/plugin-local-ai

installed @elizaos/[email protected]

410 packages installed [3.78s]

Blocked 3 postinstalls. Run `bun pm untrusted` for details.
{"level":50,"time":1742357635302,"pid":970489,"hostname":"tank","code":"ERR_MODULE_NOT_FOUND","msg":"Failed to import plugin: @elizaos/plugin-local-ai"}
[2025-03-19 04:13:55] ERROR: Failed to run database migrations:

either that or:

npm error could not determine executable to run

full error:

8 verbose argv "exec" "--" "elizaos" "start"
9 verbose logfile logs-max:10 dir:/home/jintern/.npm/_logs/2025-03-19T04_39_54_057Z-
10 verbose logfile /home/jintern/.npm/_logs/2025-03-19T04_39_54_057Z-debug-0.log
11 silly logfile start cleaning logs, removing 2 files
12 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
13 silly logfile done cleaning log files
14 http fetch GET 200 https://registry.npmjs.org/elizaos 209ms (cache updated)
15 verbose stack Error: could not determine executable to run
15 verbose stack     at getBinFromManifest (/home/jintern/.nvm/versions/node/v23.7.0/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
15 verbose stack     at exec (/home/jintern/.nvm/versions/node/v23.7.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
15 verbose stack     at async Npm.exec (/home/jintern/.nvm/versions/node/v23.7.0/lib/node_modules/npm/lib/npm.js:207:9)
15 verbose stack     at async module.exports (/home/jintern/.nvm/versions/node/v23.7.0/lib/node_modules/npm/lib/cli/entry.js:74:5)
16 verbose pkgid [email protected]
17 error could not determine executable to run
18 verbose cwd /home/jintern/Documents/v2/test

using node 23

@madjin madjin added the bug Something isn't working label Mar 19, 2025
@madjin
Copy link
Collaborator Author

madjin commented Mar 19, 2025

This is new since yesterday, some issue with Named export 'EventEmitter' not found:

eliza-v2/testing » npm create eliza@beta

> npx
> create-eliza

✔ What would you like to create? › Project - Contains agents and plugins
✔ What would you like to name your project? … new
✔ Select your database: › pglite
[2025-03-19 04:50:41] INFO: Copying project template from /home/jin/.npm/_npx/3fbc3408ef3b4759/node_modules/@elizaos/cli/templates/project-starter to /home/jin/repo/eliza-v2/testing/new
[2025-03-19 04:50:41] INFO: Setting @elizaos/cli to use latest version dynamically
[2025-03-19 04:50:41] INFO: Setting @elizaos/core to use latest version dynamically
[2025-03-19 04:50:41] INFO: Setting @elizaos/plugin-anthropic to use latest version dynamically
[2025-03-19 04:50:41] INFO: Setting @elizaos/plugin-openai to use latest version dynamically
[2025-03-19 04:50:41] INFO: Setting @elizaos/plugin-sql to use latest version dynamically
[2025-03-19 04:50:41] INFO: Installing dependencies...

changed 5 packages in 2s
bun install v1.2.5 (013fdddc)

+ [email protected]
+ [email protected]
+ @elizaos/[email protected]
+ @elizaos/[email protected]
+ @elizaos/[email protected]
+ @elizaos/[email protected]
+ @elizaos/[email protected]
+ [email protected]

296 packages installed [2.81s]
[2025-03-19 04:50:46] INFO: Building project...
[2025-03-19 04:50:46] INFO: Using build script from package.json
$ tsup
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.build.json
CLI tsup v8.4.0
CLI Using tsup config: /home/jin/repo/eliza-v2/testing/new/tsup.config.ts
CLI Target: esnext
CLI Cleaning output folder
ESM Build start
ESM dist/index.js     19.50 KB
ESM dist/index.js.map 36.40 KB
ESM ⚡️ Build success in 18ms
[2025-03-19 04:50:46] INFO: Build completed successfully with bun
[2025-03-19 04:50:46] INFO: 
Your project is ready! Here's what you can do next:
1. `cd /home/jin/repo/eliza-v2/testing/new` to change into your project directory
2. Run `npx @elizaos/cli start` to start your project
3. Visit `http://localhost:3000` to view your project in the browser
eliza-v2/testing » cd new 
testing/new » npm run start

> [email protected] start
> npx @elizaos/cli start


⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⠀⠙⠛⠿⢤⣦⣐⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣐⣿⣿⢰⡀⠀⠀⠀⠈⠻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⠤⠾⠛⠛⣿⣶⣇⠀⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢰⣋⡳⡄⠀⠀⠀⢨⣭⡀⠀⡤⠀⣀⣝⢿⣶⣿⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢸⣯⠀⣇⠀⠀⠀⣼⣿⣿⣆⢷⣴⣿⣿⡏⣛⡉⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⢸⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⣾⣿⣿⣧⠀⠀⠀⢸⠟⢀⣴⣿⣿⣿⣿⣦⡀⣠⣾⣿⣿⣿⣿⣦⡙⢿⠀
⠀⠀⠀⠙⢷⣮⠀⠀⢸⣿⣿⣿⣿⣷⣯⣟⣏⣼⣷⣅⠾⡟⠀⠀⢸⣿⣇⣀⣀⣀⠀⢸⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⣠⣿⣿⠟⠁⠀⠀⣼⣿⡟⣿⣿⣆⠀⠀⠀⠀⣿⣿⠋⠀⠈⠻⣿⡇⣿⣿⣅⣀⣀⡛⠛⠃⠀⠀
⠀⠀⠀⠀⠀⠁⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⢸⣿⡿⠿⠿⠿⠀⢸⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⣠⣾⣿⠟⠁⠀⠀⠀⣰⣿⣿⣁⣸⣿⣿⡄⠀⠀⠀⣿⣿⡀⠀⠀⢘⣿⣿⢈⣛⠿⠿⠿⣿⣷⡄⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣉⡟⠀⠀⠀⠀⠀⢸⣿⣧⣤⣤⣤⣤⢸⣿⣿⣦⣤⣤⣤⡄⣿⣿⡇⣾⣿⣿⣧⣤⣤⣤⡄⢰⣿⣿⠟⠛⠛⠻⣿⣿⡄⢠⡀⠻⣿⣿⣦⣴⣿⣿⠇⢿⣿⣦⣤⣤⣿⣿⠇⣠⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢰⡈⠛⠿⣿⣿⣿⣿⣿⠋⠀⣦⣤⣄⠀⠀⠘⠛⠛⠛⠛⠛⠛⠈⠛⠛⠛⠛⠛⠛⠃⠛⠛⠃⠛⠛⠛⠛⠛⠛⠛⠃⠛⠛⠃⠀⠀⠀⠀⠙⠛⠃⠘⠛⠀⠈⠛⠛⠛⠛⠁⠀⠀⠙⠛⠛⠛⠛⠁⠚⠛⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡦⠀⠀⠉⠛⠿⠃⠀⠀⠀⠁⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⢾⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Version: 1.0.0-beta.1
[2025-03-19 04:50:57] USERLVL: Found project by description in package.json
Startup successful!
Go to the dashboard at http://localhost:3000

[2025-03-19 04:50:58] USERLVL: Plugin @elizaos/plugin-local-ai not installed, installing into /home/jin/repo/eliza-v2/testing/new...
[2025-03-19 04:50:58] USERLVL: Installing plugin: @elizaos/plugin-local-ai
bun add v1.2.5 (013fdddc)

installed @elizaos/[email protected]

225 packages installed [1.63s]

Blocked 3 postinstalls. Run `bun pm untrusted` for details.
[2025-03-19 04:50:59] USERLVL: Failed to install plugin @elizaos/plugin-local-ai: SyntaxError: Named export 'EventEmitter' not found. The requested module 'eventemitter3' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'eventemitter3';
const { EventEmitter } = pkg;

[2025-03-19 04:50:59] USERLVL: Also failed to import from project node_modules: Named export 'EventEmitter' not found. The requested module 'eventemitter3' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'eventemitter3';
const { EventEmitter } = pkg;

[2025-03-19 04:50:59] USERLVL: Error starting agent Eliza: TypeError: Cannot convert undefined or null to object
[2025-03-19 04:50:59] USERLVL: Failed to start any agents from project, falling back to custom character
[2025-03-19 04:50:59] USERLVL: Plugin @elizaos/plugin-local-ai not installed, installing into /home/jin/repo/eliza-v2/testing/new...
[2025-03-19 04:50:59] USERLVL: Installing plugin: @elizaos/plugin-local-ai
bun add v1.2.5 (013fdddc)

installed @elizaos/[email protected]

[9.00ms] done
[2025-03-19 04:51:00] USERLVL: Failed to install plugin @elizaos/plugin-local-ai: SyntaxError: Named export 'EventEmitter' not found. The requested module 'eventemitter3' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'eventemitter3';
const { EventEmitter } = pkg;

[2025-03-19 04:51:00] USERLVL: Also failed to import from project node_modules: Named export 'EventEmitter' not found. The requested module 'eventemitter3' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'eventemitter3';
const { EventEmitter } = pkg;

[2025-03-19 04:51:00] USERLVL: An error occurred:
[2025-03-19 04:51:00] USERLVL: Error details: Cannot convert undefined or null to object
[2025-03-19 04:51:00] USERLVL: Stack trace: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at startAgent (file:///home/jin/repo/eliza-v2/testing/new/node_modules/@elizaos/cli/dist/chunk-IKVXP3AZ.js:85451:47)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async startAgents (file:///home/jin/repo/eliza-v2/testing/new/node_modules/@elizaos/cli/dist/chunk-IKVXP3AZ.js:85651:9)
    at async _Command.<anonymous> (file:///home/jin/repo/eliza-v2/testing/new/node_modules/@elizaos/cli/dist/chunk-IKVXP3AZ.js:85707:7)
    at async _Command.parseAsync (file:///home/jin/repo/eliza-v2/testing/new/node_modules/@elizaos/cli/dist/chunk-5LH7NKB4.js:1721:9)
    at async main (file:///home/jin/repo/eliza-v2/testing/new/node_modules/@elizaos/cli/dist/index.js:149:3)

@OlexanderKulyk
Copy link

same error

@OlexanderKulyk
Copy link

node -v
v23.10.0
root@local:~# npm install -g @elizaos/cli
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @elizaos/plugin-sql@^0.25.6.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2025-03-19T07_20_12_449Z-debug-0.log

@jnschilling
Copy link

+1

@OlexanderKulyk
Copy link

I just decided to study this library and it immediately broke, can you recommend a working previous version?

@shakkernerd shakkernerd added the V2 Eliza 0.2.0 label Mar 19, 2025
@madjin
Copy link
Collaborator Author

madjin commented Mar 19, 2025

When you run npm install -g @elizaos/cli, it's failing because it can't find version ^0.25.6 of @elizaos/plugin-sql.

Looking at your registry file and the code, I can see where the problem is happening. Here's what's going on:

  1. In the cli/package.json, the dependency is listed as "@elizaos/plugin-sql": "^1.0.0-beta.2", but the error indicates it's looking for ^0.25.6.

  2. The registry in paste-2.txt shows that most of the plugins are referenced with GitHub URLs (e.g., "github:elizaos/plugin-sql"), but NPM is trying to fetch a specific version.

  3. Looking at cli/src/utils/registry/index.ts, the code tries to get plugin versions from multiple sources, including a hardcoded fallback that returns 0.25.9 if it can't determine a version elsewhere. This might be related to the version discrepancy.

Here are a couple of possible solutions:

Option 1: Install from GitHub directly

Try installing directly from GitHub instead of using npm:

npm install -g github:elizaos/cli

Option 2: Clone the repo and install locally

git clone https://github.com/elizaos/elizaos.git
cd elizaos/packages/cli
npm install
npm link

Option 3: Install a specific version that might work

npm install -g @elizaos/[email protected]

Option 4: Modify package.json locally

If you're working with the source code:

  1. Edit cli/package.json to change the dependency for @elizaos/plugin-sql to match GitHub URL pattern:

    "@elizaos/plugin-sql": "github:elizaos/plugin-sql"
  2. Then build and install the CLI

This appears to be a versioning mismatch issue where the CLI is looking for a specific npm version of a package that's primarily distributed via GitHub. The versions in the repository don't align with what's published on npm.

@Block3AI
Copy link

Having similar issue thanks for sharing. Seems the @elizaos/cli package depends on @elizaos/plugin-sql@^0.25.6, but this version does not exist in the npm registry.

@lalalune
Copy link
Member

You need to use @elizaos/cli@beta

We need to figure out how to publish the packages to main while still in beta since this will happen to people

@0xtiki
Copy link

0xtiki commented Mar 20, 2025

You need to use @elizaos/cli@beta

We need to figure out how to publish the packages to main while still in beta since this will happen to people

This worked for me thanks

@jnschilling
Copy link

Option 2: Clone the repo and install locally

git clone https://github.com/elizaos/elizaos.git
cd elizaos/packages/cli
npm install
npm link

👍 Great that for your guidelines, I chose the option 2 with the difference that I used pnpm and few other adaptations

git clone https://github.com/elizaos/eliza.git
cd elizaos/packages/cli
pnpm install --no-frozen-lockfile
#back in the eliza directory
pnpm link cli
then the usual install build procedure
cheers, JN

@baahkusi
Copy link

This issue still persists. I've tried all methods above but still keep getting same error.

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

No branches or pull requests

8 participants