trunk
trunk copied to clipboard
"trunk serve --open" fails to download wasm-bindgen
When I was trying to run through the yew tutorial here https://yew.rs/ja/docs/tutorial , I encountered the following error when executing trunk serve --open
:
Feb 17 22:50:19.451 INFO downloading wasm-bindgen version="0.2.79"
Feb 17 22:51:19.469 ERROR ❌ error
error from HTML pipeline
Caused by:
0: error from asset pipeline
1: failed downloading release archive
2: error sending HTTP request
3: error sending request for url (https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.79/wasm-bindgen-0.2.79-x86_64-unknown-linux-musl.tar.gz): error trying to connect: dns error: proto error: io error: No such file or directory (os error 2)
4: error trying to connect: dns error: proto error: io error: No such file or directory (os error 2)
5: dns error: proto error: io error: No such file or directory (os error 2)
6: proto error: io error: No such file or directory (os error 2)
Feb 17 22:51:19.469 INFO 📡 serving static assets at -> /
thread 'tokio-runtime-worker' panicked at 'error binding to 0.0.0.0:8080: error creating server listener: No such file or directory (os error 2)', /home/userName/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.17/src/server/server.rs:87:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
Seems it can not find https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.79/wasm-bindgen-0.2.79-x86_64-unknown-linux-musl.tar.gz. However I tried to download it directly, it's working fine.
My system: WSL-Ubuntu-20.04
Similar when Trunk downloads sass
Feb 19 14:07:10.737 ERROR ❌ error error from HTML pipeline Caused by: 0: error from asset pipeline 1: failed downloading release archive 2: error sending HTTP request 3: error sending request for url (https://github.com/sass/dart-sass/releases/download/1.37.5/dart-sass-1.37.5-linux-x64.tar.gz): connection error: unexpected end of file 4: connection error: unexpected end of file 5: unexpected end of file
Similar when Trunk downloads sass
Feb 19 14:07:10.737 ERROR ❌ error error from HTML pipeline Caused by: 0: error from asset pipeline 1: failed downloading release archive 2: error sending HTTP request 3: error sending request for url (https://github.com/sass/dart-sass/releases/download/1.37.5/dart-sass-1.37.5-linux-x64.tar.gz): connection error: unexpected end of file 4: connection error: unexpected end of file 5: unexpected end of file
Finally I mannually download the sass and solve the problem
I came across exactly the same problem as lolitacon2012 on WSL Ubuntu 18.04. I can download wasm-bindgen gz directly, unzip it and copy the files under a PATH directory, and it works
I also had problems with that. I'm using Archlinux with systemd-resolved, which manages DNS differenly (via DBUS). Consequently, my /etc/resolv.conf file was empty. Adding a DNS server like this worked the problem around:
nameserver 8.8.8.8
Also related to #317, trunk cannot handle IPv6 addresses.
Please check your resolv.conf files, that might be the problem, try removing IPv6 addresses, etc. Please bear in mind that resolv.conf might be regenerated upon reboot!
Could you explain in more detail what you did after downloading wasm-bindgen directly?
Same issue with "failed install dart-sass". I installed it manually at my mac by brew install sass/sass/sass
.
It works
I also had problems with that. I'm using Archlinux with systemd-resolved, which manages DNS differenly (via DBUS). Consequently, my /etc/resolv.conf file was empty. Adding a DNS server like this worked the problem around:
nameserver 8.8.8.8
Also related to #317, trunk cannot handle IPv6 addresses.
Please check your resolv.conf files, that might be the problem, try removing IPv6 addresses, etc. Please bear in mind that resolv.conf might be regenerated upon reboot!
Totally fixed for me on ubuntu 22.04 (using dnsmasq instead of systemd-resolved), adding a nameserver like @susu did.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.