-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Installation failed on node-llama-cpp postscript #1503
Comments
i was able sucessfully installed this release on old intel based mac, but struggle to make it works on Apple silicon (that's the one difference between these 2 systems, the rest like node version, pnpm and the rest were the same). pnpm 9.15.1 were used for both, node 23+. I'm keen to make it work on my main mac (Apple silicon), still curious if we can solve it. |
i have researched the question about cpp and found out the following:
I have M2 Chip |
I have exactly the same problem |
I have a M4 machine and it works perfectly on my device with pnpm version being |
The problem seems to be explicitly related to M2 machines. |
have you found a solution? |
You need to check that you have the proper node version in your system otherwise node -e "console.log(process.platform, process.arch)"
darwin arm64 I have reinstalled nodejs package natively in the system, remove nvm usage as it didn't support arm version of node. but later I encountered with bunch of problems the package compatibility as some of them support only x64 architecture: like esbuild, rollup, sharp... I was able to fix them by changing dependencies in package.json(s) on arm supported versions or sometimes just updated their versions up to the most recent. But I'm stuck at sharp package with the following logs: npm start
WARN Unsupported engine: wanted: {"node":"23.3.0"} (current: {"node":"v23.5.0","pnpm":"9.15.1"})
> eliza@ start /Users/r2d2/Documents/Code_Projects/eliza
> pnpm --filter "@elizaos/agent" start --isRoot
. | WARN Unsupported engine: wanted: {"node":"23.3.0"} (current: {"node":"v23.5.0","pnpm":"9.14.4"})
docs | WARN Unsupported engine: wanted: {"node":"23.3.0"} (current: {"node":"v23.5.0","pnpm":"9.14.4"})
> @elizaos/[email protected] start /Users/r2d2/Documents/Code_Projects/eliza/agent
> node --loader ts-node/esm src/index.ts "--isRoot"
(node:8415) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8415) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
[ElizaLogger] Initializing with:
isNode: true
verbose: false
VERBOSE env: undefined
NODE_ENV: undefined
ℹ INFORMATIONS
Loading embedding settings:
{"OLLAMA_EMBEDDING_MODEL":"mxbai-embed-large"}
ℹ INFORMATIONS
Loading character settings:
{"ARGV":["/usr/local/bin/node","/Users/r2d2/Documents/Code_Projects/eliza/agent/src/index.ts","--isRoot"],"CWD":"/Users/r2d2/Documents/Code_Projects/eliza/agent"}
ℹ INFORMATIONS
Parsed settings:
{"USE_OPENAI_EMBEDDING_TYPE":"undefined","USE_OLLAMA_EMBEDDING_TYPE":"undefined","OLLAMA_EMBEDDING_MODEL":"mxbai-embed-large"}
using deprecated parameters for the initialization function; pass a single object instead
/Users/r2d2/Documents/Code_Projects/eliza/node_modules/sharp/lib/sharp.js:113
throw new Error(help.join('\n'));
^
**_Error: Could not load the "sharp" module using the darwin-arm64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=darwin --cpu=arm64 sharp_**
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/Users/r2d2/Documents/Code_Projects/eliza/node_modules/sharp/lib/sharp.js:113:9)
at Module._compile (node:internal/modules/cjs/loader:1740:14)
at Object..js (node:internal/modules/cjs/loader:1905:10)
at Module.load (node:internal/modules/cjs/loader:1474:32)
at Function._load (node:internal/modules/cjs/loader:1286:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:234:24)
at Module.require (node:internal/modules/cjs/loader:1496:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Users/r2d2/Documents/Code_Projects/eliza/node_modules/sharp/lib/constructor.js:10:1)
Node.js v23.5.0
/Users/r2d2/Documents/Code_Projects/eliza/agent:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @elizaos/[email protected] start: `node --loader ts-node/esm src/index.ts "--isRoot"`
Exit status 1
ELIFECYCLE Command failed with exit code 1.
I tried different options and things to come over the problem but was unsuccessful so far. Any ideas on that though? by the way,it worth to make the package list more compatible across different platforms. some versions were used old one which doesn't have such compatability. |
Hello mate. Here some tips 1. TLDR (Executive Summary)
2. Quick Resolution Path
3. Comprehensive Solution
|
installation process stucks during quick start guide steps, installation node-llama-cpp failed and then it stuck on node_modules/@discordjs/opus: Running install script...
Used node 23.3.0
The commit version is 77b5b7d v0.1.7-alpha.1
77b5b7d v0.1.7-alpha.1 ● ? pnpm install --no-frozen-lockfile ✔ 10161 21:41:18
Scope: all 47 workspace projects
client | WARN Installing a dependency from a non-existent directory: /Users/r2d2/Documents/Code_Projects/eliza/client/@tanstack/router-plugin/vite
packages/adapter-redis | WARN deprecated @types/[email protected]
packages/client-discord | WARN deprecated @discordjs/[email protected]
packages/client-slack | WARN deprecated @slack/[email protected]
packages/core | WARN deprecated @types/[email protected]
packages/plugin-node | WARN deprecated @cliqz/[email protected]
packages/plugin-story | WARN deprecated @pinata/[email protected]
packages/plugin-trustdb | WARN deprecated @types/[email protected]
WARN 34 deprecated subdependencies found: @cliqz/[email protected], @cliqz/[email protected], @cliqz/[email protected], @humanwhocodes/[email protected], @humanwhocodes/[email protected], @motionone/[email protected], @simplewebauthn/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
WARN Issues with peer dependencies found
client
├─┬ @vitejs/plugin-react 4.3.3
│ └── ✕ unmet peer vite@"^4.2.0 || ^5.0.0": found 0.0.0
├─┬ vite-plugin-top-level-await 1.4.4
│ └── ✕ unmet peer vite@>=2.8: found 0.0.0
└─┬ vite-plugin-wasm 3.3.0
└── ✕ unmet peer vite@"^2 || ^3 || ^4 || ^5": found 0.0.0
packages/client-lens
└─┬ @lens-protocol/client 2.2.0
└─┬ @lens-protocol/gated-content 0.5.1
└─┬ @lit-protocol/node-client 2.1.62
├─┬ @walletconnect/ethereum-provider 2.17.3
│ └─┬ @walletconnect/modal 2.7.0
│ ├─┬ @walletconnect/modal-core 2.7.0
│ │ └─┬ valtio 1.11.2
│ │ ├── ✕ missing peer react@>=16.8
│ │ └─┬ use-sync-external-store 1.2.0
│ │ └── ✕ missing peer react@"^16.8.0 || ^17.0.0 || ^18.0.0"
│ └─┬ @walletconnect/modal-ui 2.7.0
│ └─┬ @walletconnect/modal-core 2.7.0
│ └── ✕ missing peer react@>=16.8
└─┬ @lit-protocol/auth-browser 2.1.62
└─┬ @walletconnect/ethereum-provider 2.17.3
└── ✕ missing peer react@>=16.8
Peer dependencies that should be installed:
react@">=16.8.0 <17.0.0 || >=17.0.0 <18.0.0 || >=18.0.0 <19.0.0"
packages/core
└─┬ @langchain/core 0.3.26
└─┬ zod-to-json-schema 3.24.1
└── ✕ unmet peer zod@^3.24.1: found 3.23.8
packages/plugin-0g
└─┬ @0glabs/0g-ts-sdk 0.2.1
└── ✕ unmet peer [email protected]: found 6.13.4
packages/plugin-goat
├─┬ @goat-sdk/wallet-viem 0.1.3
│ └── ✕ unmet peer @goat-sdk/[email protected]: found 0.3.8
└─┬ @goat-sdk/plugin-coingecko 0.1.4
├── ✕ unmet peer @goat-sdk/[email protected]: found 0.3.8
└── ✕ unmet peer [email protected]: found 2.21.53
Packages: +4705
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 4088, reused 3922, downloaded 0, added 4705, done
node_modules/@swc/core: Running postinstall script...
node_modules/canvas: Running install script...
node_modules/node-llama-cpp: Running postinstall script, failed in 1.6s
node_modules/node-llama-cpp postinstall$ node ./dist/cli/cli.js postinstall
└─ Failed in 1.6s at /Users/r2d2/Documents/Code_Projects/eliza/node_modules/node-llama-cpp
node_modules/@discordjs/opus: Running install script...
The text was updated successfully, but these errors were encountered: