Closed Selicre closed 1 year ago
Hey, I had this very problem myself yesterday. It took me an hour to work out what the underlying issue is.
There might be a debate as to if this plugin should try to install Wasm-Pack globally using NPM, or if it should not. Until that debate is made, I feel quite strongly this should in the meantime be outputting error information. Just so that it's easier to debug NPM and Yarn errors if they happen.
When the script attempts to install wasm-pack if it doesn't exist, it does so with the
-g
flag, which by default tries to install in/usr/lib
, which the running user likely has no permissions for. This is then reported as a "Rust compilation error" with no further information, leading to a wild goose chase on what the actual problem is.Steps to reproduce:
Proposed fixes:
-g
flag.