Ive bee trying to compile https://github.com/slowtec/leaflet-rs/tree/master/examples/yew-component for a while now, first it told me I needed to install https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html which I did and that just caused more errors when starting the project. Eventually I installed trunk using brew and now im only getting this issue below:
‚ùØ trunk serve
2024-05-14T08:55:43.596368Z INFO üöÄ Starting trunk 0.20.1
2024-05-14T08:55:43.610900Z INFO üì¶ starting build
2024-05-14T08:55:43.670324Z ERROR ‚ùå error
error from build pipeline
Caused by:
0: error getting cargo metadata
1: cargo metadata
exited with an error: error: current package believe
s it’s in a workspace when it’s not:
current: /Users/kaare/Documents/manolin_map_of_world/backend/world_
map/leaflet-rs/examples/yew-component/Cargo.toml
workspace: /Users/kaare/Documents/manolin_map_of_world/backend/world_
map/Cargo.toml
this may be fixable by adding `leaflet-rs/examples/yew-component` to
the workspace.members
array of the manifest located at: /Users/kaare/Docum
ents/manolin_map_of_world/backend/world_map/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to th
e workspace.exclude
array, or add an empty [workspace]
table to the pack
age’s manifest.
2024-05-14T08:55:43.671553Z INFO üì° serving static assets at -> /
2024-05-14T08:55:43.671599Z INFO üì° server listening at:
2024-05-14T08:55:43.671602Z INFO üè† http://127.0.0.1:8080/
2024-05-14T08:55:43.671604Z INFO üè† http://[::1]:8080/
— NOTE: When I visit localhost:8080 its all just empty, and shows the following in console:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.
(index):25 WebSocket connection to ‘ws://localhost:8080/_trunk/ws’ failed:
(anonymous) @ (index):25
The resource http://localhost:8080/leaflet-rs-example-yew-component-1c49ba35ce874fff_bg.wasm was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as
value and it is preloaded intentionally.
(index):25 WebSocket connection to ‘ws://localhost:8080/_trunk/ws’ failed:
(anonymous) @ (index):25
timmy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.