Skip to content

Error: Command npm run -s node-gyp-llama -- configure --arch=arm64 --target=v18.0.0 exited with code 1 #26

@loretoparisi

Description

@loretoparisi

I'm running the example script provided in the README.md using a local/offline copy of this library (that should work fine). I get this error when calling the script the first time. I'm not using any specific env, the llama.cpp has been downloaded in the folder of the bindings under llama/llama.cpp:

.
├── example.js
├── lib
│   ├── AbortError.d.ts
│   ├── AbortError.js
│   ├── AbortError.js.map
│   ├── ChatPromptWrapper.d.ts
│   ├── ChatPromptWrapper.js
│   ├── ChatPromptWrapper.js.map
│   ├── chatWrappers
│   ├── cli
│   ├── commands.d.ts
│   ├── commands.js
│   ├── commands.js.map
│   ├── config.d.ts
│   ├── config.js
│   ├── config.js.map
│   ├── index.d.ts
│   ├── index.js
│   ├── index.js.map
│   ├── llamaEvaluator
│   ├── package.json
│   ├── types.d.ts
│   ├── types.js
│   ├── types.js.map
│   └── utils
└── llama
    ├── addon.cpp
    ├── binariesGithubRelease.json
    ├── binding.gyp
    ├── llama.cpp
    └── usedBin.json

The example script was

import {fileURLToPath} from "url";
import path from "path";
import {LlamaModel, LlamaContext, LlamaChatSession} from "./lib/index.js";

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const model = new LlamaModel({
    modelPath: path.join(__dirname, "models", "LaMA-2-7B-32K_GGUF", "LLaMA-2-7B-32K-Q3_K_L.gguf")
});
const context = new LlamaContext({model});
const session = new LlamaChatSession({context});


const q1 = "Hi there, how are you?";
console.log("User: " + q1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions