wails icon indicating copy to clipboard operation
wails copied to clipboard

Error in serving frontend after build -p

Open alinangnaiba opened this issue 6 years ago • 7 comments

Description

After packaging the application I get an error when running npm run serve the frontend. Looking at the Sources tab the issue is from this line window.wails._.Init(callback);

To Reproduce Steps to reproduce the behaviour:

  1. Run wails build -p
  2. Run npm run serve in frontend directory
  3. In the browser go to localhost:8080 or where ever your app is running
  4. Open dev tool to view console error

Screenshots image

System Details

Name Value
Wails Version v1.0.2
Go Version go1.13
Platform windows
Arch amd64
GO111MODULE (Not Set)
GCC 9.2.0
Npm 6.10.2
Node v12.8.1

alinangnaiba avatar Apr 19 '20 08:04 alinangnaiba

Serve isn't for packaged apps. Only package them when you're ready to distribute them. Does it work for you without the -p?

leaanthony avatar Apr 19 '20 09:04 leaanthony

No, I wanted to make additional functionality in the app after it is packaged. I want to add code and run serve again

alinangnaiba avatar Apr 19 '20 09:04 alinangnaiba

Ok, so I tried creating a new app with wails init, this time I chose the vuetify template. I get the same error. It's the first time I ran npm run serve and I have not edited the code.

alinangnaiba avatar Apr 19 '20 09:04 alinangnaiba

I figured what happened. Thanks!

alinangnaiba avatar Apr 19 '20 09:04 alinangnaiba

what happened?

leaanthony avatar Apr 26 '20 08:04 leaanthony

A user error. Backend was not running and I forgot to comment out Wails.Init(). :)

alinangnaiba avatar Apr 26 '20 09:04 alinangnaiba

you shouldn't need to comment out wails.Init. If it doesn't work without commenting it out, please reopen this.

leaanthony avatar Apr 26 '20 20:04 leaanthony