Trying to build Livesplit one
When I try to run the command "npm run build:core" i get these errors
error[E0463]: can't find crate for `core`
|
= note: the `wasm32-unknown-unknown` target may not be installed
= help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `std`
|
= note: the `wasm32-unknown-unknown` target may not be installed
= help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
error: build failed
child_process.js:674
throw err;
^
Error: Command failed: cargo build -p cdylib --features wasm-web --target wasm32-unknown-unknown --release
at checkExecSyncError (child_process.js:635:11)
at execSync (child_process.js:671:15)
at Object.<anonymous> (/home/ryan/Downloads/LiveSplitOne/buildCore.js:12:1)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
status: 101,
signal: null,
output: [ null, null, null ],
pid: 176230,
stdout: null,
stderr: null
}
to try and fix the first error I ran rustup target add wasm32-unknown-unknown again but I get this message
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
That almost sounds like rust is installed via your system package manager and rustup then installed a separate rust installation.
Also getting a simmelar issue has to do with the lack of rustup on debian. my system rustup target add wasm32-unknown-unknown and probably some more stuff fails if you dont install it and if you do youl end up with a broken rust install and you come across isues like Pryganss did obviusly i dont know what system hes running, just thought i shuld shed some light on it
note i managed to install liveSplitOne without rustup by doing the following sudo apt install rustc curl build-essential gcc make librust-wasm-bindgen-dev libstd-rust-dev-wasm32 export PATH="$PATH:$HOME/.cargo/bin" npm install npm run build:core
i reccomend rewriting the build instrucitons to avoid confusion in future. somthing like requires libstd-rust-dev-wasm32 can be installed with rustup target add wasm32-unknown-unknown or your package manager
sudo apt install libstd-rust-dev-wasm32 ##debian
if cargo is not in your path you may have to export it or better yet add it in $HOME/.bashrc export PATH="$PATH:$HOME/.cargo/bin" ##export for duration of current terminal session
i added the script i made to install liveSplitOne, its very simple, discplaimer i made this file for me any opinions within ware meant for my future self only, change extension from .txt to .sh to use as script liveSplitOne.txt
I'll close this as there's nothing we can do from our side. Usually installing via rustup is the best option.