Open divowu opened 2 years ago
Working with these specs for me. Try to run with wails dev
and check the error.
Wails CLI v2.0.0-beta.44.2
Scanning system - Please wait (this may take a long time)...Done.
System
------
OS: Windows 10 Home
Version: 2009 (Build: 19044)
ID: 21H2
Go Version: go1.18.5
Platform: windows
Architecture: amd64
Wails
------
Version: v2.0.0-beta.44.2
Dependency Package Name Status Version
---------- ------------ ------ -------
WebView2 N/A Installed 105.0.1343.27
npm N/A Installed 8.11.0
*upx N/A Available
*nsis N/A Available
* - Optional Dependency
Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details:
- upx : Available at https://upx.github.io/
- nsis : Available at https://nsis.sourceforge.io/Download
Thanks for using Wails und reporting this.
Could you please build a debug build wails build --debug
and paste the output of the console when started from the command line on your Win10 system?
Thanks 🙏
Thanks for your quick reply!
ERROR: open D:\workspace\go\wails\helloworld\frontend\wailsjs\runtime\package.json: Access is denied.
And I found out the folder ‘frontend/wailsjs/runtime’ has been deleted.
The above error occurred when I used this command ‘wails build -debug’.
When I use 'wails dev‘, And then I got blow message:
vite v2.9.15 building for production... transforming... ✓ 4 modules transformed.
Could not resolve '../wailsjs/go/main/App' from src/main.js
error during build:
Error: Could not resolve '../wailsjs/go/main/App' from src/main.js
at error (D:\workspace\go\wails\helloworld\frontend\node_modules\rollup\dist\shared\rollup.js:198:30)
at ModuleLoader.handleResolveId (D:\workspace\go\wails\helloworld\frontend\node_modules\rollup\dist\shared\rollup.js:22464:24)
at D:\workspace\go\wails\helloworld\frontend\node_modules\rollup\dist\shared\rollup.js:22427:26
ERROR: exit status 1
Sorry for my mistaken. The command I used ‘wails build --debug' instead of ‘wails build -debug', It can build a debug mode application. But I run the application, It hold on a black screen.
me too And I found out the folder ‘frontend/wailsjs/runtime’ has been deleted. And I found out the folder ‘frontend/wailsjs/go/main’ has been deleted.
@divowu @107295472 - Could you please try the latest release as this includes a change that should fix this issue? To upgrade, please run: wails update -pre
@leaanthony ,
I update wails with your command wails update -pre
and update the wails module to v2.0.0-rc.1.1, build a debug mod application with wails build --debug
. It still hold on a black screen.
How can I test windows 10 ARM?
One thing to do: build with wails build -debug
and then right click the blank window and check the console logs via inspect->console
@divowu It seems like you are selecting one character from the console window, indicated by the "white rectangle" in your last screenshot. If you select in the console window, the whole app is getting blocked, this is a common behaviour on windows due to blocked message loop. Please deselect by clicking again into the console window and pressing enter.
@stffabi
indicated by the "white rectangle" in your last screenshot ...
No, The rectangle is where I selected in the console window text select box.
@leaanthony , Nothing happen when I right click the blank window.
Have you tried use wails dev
? What's the output there?
FY.
I'm not really sure this relates to the architecture of your OS. If you create a new project, using the release candidate, are you able to reproduce this error? This looks like bad imports to me.
Can't use dev, build, or tasks in vscode dev cannot generate files for wailsjs/go/main/xxx
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm also having issues on Windows.. on the rare occasions where the build succeeds (similar behavior as #2367), running the output .exe does literally nothing, not even launching it via CMD. That being said, wails dev
launches just fine (when it decides to).
What makes this really frustrating to me is that I've been trying to create this program for a friend of mine for about a week, first with Fyne and then Gio but I was unable to get anywhere with either of them, so I tried with Wails and did succeed, but I am unable to build the program for my friend to use.
I'm on Windows 10 and already tried Wails versions 2.4.1
, 2.4.0
and 2.3.1
(wails update -pre
did nothing) to no avail.
As far as I can tell, the WebView2 runtime is installed on my system (it said so when trying to install it manually).
Update: I just learned that by not including the -windowsconsole
flag during builds, it doesn't show any errors if you launch the .exe via CMD/Powershell (which I guess kinda makes sense), so it turned out that I had changed the code in a way that prevented it from properly functioning and it was producing an error, I just couldn't see it due to the lack of the flag.
I have now fixed the code and it now works as expected. It still doesn't explain why dev builds worked, but I digress.
Please disregard my previous comment.
Please switch to the latest version and try again, if the error persists, please provide the reproduction code.
@HeCorr could you possibly explain what the core issue was and if we need to fix something? Thanks
@leaanthony I had removed a piece of code that I thought wasn't essential (because dev builds kept working without it) but turned out to be, so as far as I can tell, build
doesn't need fixing, but dev
definitely does: #2367
Actually, that issue seems to be a bit different than mine. My wailsjs/runtime
and wailsjs/go
folders do get deleted/recreated when starting up a dev instance and that often causes (what I believe to be) tsc
errors saying that the module wasn't found.
If you want I can create a separate issue that addresses it with more details.
That would be great, thanks!
Description
I create a HelloWorld project and build it. But the builded application cannot runing in my windows 10 amd64.(Nothing window ui being open) It can runing well in win 11.
To Reproduce
1, create a helloworld project and build it , with below wails commands: wails init -n helloworld wails build 2, Double click the compiled exe file : ${project folder}/build/bin/helloworld.exe
After clicked , nothing happen in my win10 amd64, but it work in win11 amd64.
Expected behaviour
Nothing.
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response