GithubHelp home page GithubHelp logo

Comments (4)

allevo avatar allevo commented on June 5, 2024

Hi! Thanks for reporting this issue.
The problem you raised comes from the new support of Mandarin: we leverage on a rust package that is compiled using wasm-pack.
Have you tried to install it globally?

from orama.

mariocampacci avatar mariocampacci commented on June 5, 2024

Hi @allevo,
installed the wasm-pack as suggested.
I get another error:

@orama/tokenizers:build: Error: failed to start `cargo metadata`: No such file or directory (os error 2)
@orama/tokenizers:build: Caused by: failed to start `cargo metadata`: No such file or directory (os error 2)
@orama/tokenizers:build: Caused by: No such file or directory (os error 2)

the error is the same if I installed the package running npm -g i wasm-pack or pnpm i wasm-pack -w.

Should rust and cargo be installed too?
Tried to install them via apk add rust and apk add cargo and get this error:

@orama/tokenizers:build: 
@orama/tokenizers:build: > @orama/[email protected] build /workspaces/orama/packages/tokenizers
@orama/tokenizers:build: > node ./scripts/build.mjs
@orama/tokenizers:build: 
@orama/tokenizers:build: [INFO]: 🎯  Checking for the Wasm target...
@orama/tokenizers:build: Error: wasm32-unknown-unknown target not found in sysroot: "/usr"
@orama/tokenizers:build: 
@orama/tokenizers:build: Used rustc from the following path: "/usr/bin/rustc"
@orama/tokenizers:build: It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed manually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
@orama/tokenizers:build: 
@orama/tokenizers:build: Caused by: wasm32-unknown-unknown target not found in sysroot: "/usr"
@orama/tokenizers:build: 
@orama/tokenizers:build: Used rustc from the following path: "/usr/bin/rustc"
@orama/tokenizers:build: It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed manually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
@orama/tokenizers:build: 
@orama/tokenizers:build: node:internal/errors:932
@orama/tokenizers:build:   const err = new Error(message);
@orama/tokenizers:build:               ^
@orama/tokenizers:build: 
@orama/tokenizers:build: Error: Command failed: cd /workspaces/orama/packages/tokenizers/src/tokenizer-mandarin && wasm-pack build --target web
@orama/tokenizers:build: [INFO]: 🎯  Checking for the Wasm target...
@orama/tokenizers:build: Error: wasm32-unknown-unknown target not found in sysroot: "/usr"
@orama/tokenizers:build: 
@orama/tokenizers:build: Used rustc from the following path: "/usr/bin/rustc"
@orama/tokenizers:build: It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed manually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
@orama/tokenizers:build: 
@orama/tokenizers:build: Caused by: wasm32-unknown-unknown target not found in sysroot: "/usr"
@orama/tokenizers:build: 
@orama/tokenizers:build: Used rustc from the following path: "/usr/bin/rustc"
@orama/tokenizers:build: It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed manually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.
@orama/tokenizers:build: 
@orama/tokenizers:build: 
@orama/tokenizers:build:     at checkExecSyncError (node:child_process:890:11)
@orama/tokenizers:build:     at Object.execSync (node:child_process:962:15)
@orama/tokenizers:build:     at file:///workspaces/orama/packages/tokenizers/scripts/build.mjs:25:14
@orama/tokenizers:build:     at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
@orama/tokenizers:build:     at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
@orama/tokenizers:build:     at async loadESM (node:internal/process/esm_loader:28:7)
@orama/tokenizers:build:     at async handleMainPromise (node:internal/modules/run_main:113:12) {
@orama/tokenizers:build:   status: 1,
@orama/tokenizers:build:   signal: null,
@orama/tokenizers:build:   output: [
@orama/tokenizers:build:     null,
@orama/tokenizers:build:     Buffer(0) [Uint8Array] [],
@orama/tokenizers:build:     Buffer(754) [Uint8Array] [
@orama/tokenizers:build:        91,  73,  78,  70,  79,  93,  58,  32, 240, 159, 142, 175,
@orama/tokenizers:build:        32,  32,  67, 104, 101,  99, 107, 105, 110, 103,  32, 102,
@orama/tokenizers:build:       111, 114,  32, 116, 104, 101,  32,  87,  97, 115, 109,  32,
@orama/tokenizers:build:       116,  97, 114, 103, 101, 116,  46,  46,  46,  10,  69, 114,
@orama/tokenizers:build:       114, 111, 114,  58,  32, 119,  97, 115, 109,  51,  50,  45,
@orama/tokenizers:build:       117, 110, 107, 110, 111, 119, 110,  45, 117, 110, 107, 110,
@orama/tokenizers:build:       111, 119, 110,  32, 116,  97, 114, 103, 101, 116,  32, 110,
@orama/tokenizers:build:       111, 116,  32, 102, 111, 117, 110, 100,  32, 105, 110,  32,
@orama/tokenizers:build:       115, 121, 115, 114,
@orama/tokenizers:build:       ... 654 more items
@orama/tokenizers:build:     ]
@orama/tokenizers:build:   ],
@orama/tokenizers:build:   pid: 10268,
@orama/tokenizers:build:   stdout: Buffer(0) [Uint8Array] [],
@orama/tokenizers:build:   stderr: Buffer(754) [Uint8Array] [
@orama/tokenizers:build:      91,  73,  78,  70,  79,  93,  58,  32, 240, 159, 142, 175,
@orama/tokenizers:build:      32,  32,  67, 104, 101,  99, 107, 105, 110, 103,  32, 102,
@orama/tokenizers:build:     111, 114,  32, 116, 104, 101,  32,  87,  97, 115, 109,  32,
@orama/tokenizers:build:     116,  97, 114, 103, 101, 116,  46,  46,  46,  10,  69, 114,
@orama/tokenizers:build:     114, 111, 114,  58,  32, 119,  97, 115, 109,  51,  50,  45,
@orama/tokenizers:build:     117, 110, 107, 110, 111, 119, 110,  45, 117, 110, 107, 110,
@orama/tokenizers:build:     111, 119, 110,  32, 116,  97, 114, 103, 101, 116,  32, 110,
@orama/tokenizers:build:     111, 116,  32, 102, 111, 117, 110, 100,  32, 105, 110,  32,
@orama/tokenizers:build:     115, 121, 115, 114,
@orama/tokenizers:build:     ... 654 more items
@orama/tokenizers:build:   ]
@orama/tokenizers:build: }
@orama/tokenizers:build: 
@orama/tokenizers:build: Node.js v20.11.1
@orama/tokenizers:build:  ELIFECYCLE  Command failed with exit code 1.
@orama/tokenizers:build: ERROR: command finished with error: command (/workspaces/orama/packages/tokenizers) pnpm run build exited (1)

from orama.

micheleriva avatar micheleriva commented on June 5, 2024

@mariocampacci I merged a PR that should resolve this problem #650

from orama.

mariocampacci avatar mariocampacci commented on June 5, 2024

@micheleriva yes, indeed skipping the build did resolve the issue. Thank you!

from orama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.