Open precisionpete opened 11 months ago
I think I solved it. I had moved the App.go code into a separate package to avoid having to make calls into main. I think this messed up the go embedding. When I returned it to the main package, the problem stopped. I suspect it worked in wails dev because of the asset handler doing the job of the embedding.
I need to go back to the books about how to get stuff in the main package accessible from elsewhere.
You can move things around how you want, just update the embed path (has to be a subdirectory of the current). You can even just package the assets in a different package and export if you like.
Hello, I want to call other wails programs, such as https://github.com/yt-dlp/yt-dlp/releases, within the built unix application, but after the build is complete, I can't find the unix file, @leaanthony Have you ever tried this operation before? Or do you have any solution? by looking at the size of the wails file, it seems that the unix file has been packaged into the application
@sgx-wb Can you show your main.go file where the embeds are defined? It also looks like you're jumping into an unrelated thread, can you join the discord or create your own issue?
@sgx-wb Can you show your main.go file where the embeds are defined?
@PylotLight I didn't modify main.go. I just modified vite.config.js and added the static folder.
@sgx-wb have a go at //go:embed frontend/dist frontend/dist/test
instead?
@sgx-wb have a go at
//go:embed frontend/dist frontend/dist/test
instead?
@PylotLight https://github.com/wailsapp/wails/issues/3055 I created a new question.
I am getting this issue, however my app.go is inside of package main, I am using ReactJs
When running wails dev
it works however wails build
does not work I get the error:
no
index.htmlcould be found in your Assets fs.FS, please make sure the embedded directory 'frontend/dist' is correct and contains your assets
//go:embed all:frontend/dist var assets embed.FS
If you change where your assets are built to, then you'll need to change your //go:embed
line to point to the right place
wails build command does not seem to compile the UI any longer?
Description
I have an app that used to work but now I am getting
no
index.htmlcould be found in your Assets fs.FS, please make sure the embedded directory '.' is correct and contains your assets
.wails dev
works fine butwails build
produces the error. I assume this means its not something in my code?To Reproduce
Using my specific app. Run:
wails dev
--> it workswails build
build/bin/myapp
2023/11/10 10:12:01 no
index.html
could be found in your Assets fs.FS, please make sure the embedded directory '.' is correct and contains your assetsIt works fine with the example app.
Expected behaviour
the build should work
Screenshots
No response
Attempted Fixes
I tried changing the order of embeds, same problem.
I tested on macOS & Windows and it fails there too.
System Details
Additional context
I'm sure it has something to do with the build timing. I am looking for suggestions for debugging at this point.
Interestingly, Wails Dr identifies Go 1.21.1 but I am using Go 1.21.4. Where is it getting this from? I have had a few strange transient problems similar to this...