cargo-node icon indicating copy to clipboard operation
cargo-node copied to clipboard

Cargo-node cannot install wasm2js

Open LuminousLizard opened this issue 5 years ago • 1 comments

Describe the bug I cannot run the cargo-node versions of OrbTK with the commands provided in the Readme.md because cargo-node cannot install wasm2js. I have following error message:

[luminouslizard@lumi orbtk-develop]$ cargo node run --target android --example showcase     

install wasm2js
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/luminouslizard/.npm/_logs/2020-11-26T21_42_19_959Z-debug.log

If I run the command with sudo (to give the permission), following message is displayed: error: no override and no default toolchain set

To Reproduce The native desktop version of OrbTk works perfect. Following the steps provided in the Readme.md for the browser or cordova version. I installed cargo-node, NodeJS, npm and cordova.

Desktop:

  • OS: Linux 5.9.10 Manjaro KDE
  • Browser Firefox 83.0
  • rustc 1.48.0 (7eac88abb 2020-11-16)
  • rustup 1.22.1 (b01adbbc3 2020-07-08)
  • NodeJS 15.2.1-1
  • npm 6.14.8-2

LuminousLizard avatar Nov 27 '20 07:11 LuminousLizard

I could handle the error above by changing the global npm package folder to home and installed wasm2js manually via npm install wasm2js --global. But

  1. the browser and electron version are blank pages
  2. the android version panicked at compiling
create templates
        wasm2js
thread 'main' panicked at 'Could not run wasm2js.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/luminouslizard/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-node-0.1.0/src/builder.rs:248:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

LuminousLizard avatar Nov 28 '20 17:11 LuminousLizard