Wails: npx ng serve fails for fresh project on v0.18.2 but works on v0.17.0; with error rontend/node_modules/@wailsapp/runtime/runtime"' has no default export

Created on 9 Oct 2019  ·  3Comments  ·  Source: wailsapp/wails

Description
Running wails init to generate a new project work in v0.17.0 of wails, but using v0.18.2 it does not. Specifically, after generating the project using wails init and then using wails serve to serve the app, an error is reported when running npx ng serve --poll=2000 from the frontend directory, namely:

ERROR in src/main.ts(9,8): error TS1192: Module '"/home/u/Desktop/go/src/play/w0182/foo/frontend/node_modules/@wailsapp/runtime/runtime"' has no default export.

To Reproduce
Steps to reproduce the behaviour:

  1. Use wails v0.18.2, and run wails init
  2. Run wails serve
  3. Run npx ng serve --poll=2000 from the frontend directory.
  4. Observe error: ERROR in src/main.ts(9,8): error TS1192: Module '"/home/u/Desktop/go/src/play/w0182/foo/frontend/node_modules/@wailsapp/runtime/runtime"' has no default export.

Expected behaviour
No error, and the ability to navigate to the "hello world" wails page.

Screenshots
Terminal 1:

u@x1 ~/D/g/s/p/w/foo> wails serve
Wails v0.18.2 - Serving Application

✓ Ensuring Dependencies are up to date...
✓ Packing + Compiling project...
Awesome! Project 'foo' built!
Serving Application: /home/u/Desktop/go/src/play/w0182/foo/foo
foo - Debug Build
-----------------
INFO[0000] [App] Starting                               
INFO[0000] [Events] Starting                            
INFO[0000] [Events] Listening                           
INFO[0000] [IPC] Starting                               
INFO[0000] [Bind] Starting                              
INFO[0000] [Bind] Binding Go Functions/Methods          
INFO[0000] [Bind] Bound Function: main.basic()          
INFO[0000] [Bridge] Bridge mode started.                
INFO[0000] [Bridge] The frontend will connect automatically. 
>>>>> To connect, you will need to run 'npx ng serve --poll=2000' in the 'frontend' directory <<<<<

Terminal 2:

u@x1 ~/D/g/s/p/w/f/frontend> npx ng serve --poll=2000
 10% building 3/3 modules 0 activeℹ 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: 404s will fallback to //index.html

Date: 2019-10-08T22:43:05.796Z
Hash: 35cc52d9a522ad3646f1
Time: 4329ms
chunk {main} main.js, main.js.map (main) 2.17 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 119 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 17.5 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 328 kB [initial] [rendered]

ERROR in src/main.ts(9,8): error TS1192: Module '"/home/u/Desktop/go/src/play/w0182/foo/frontend/node_modules/@wailsapp/runtime/runtime"' has no default export.

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
ℹ 「wdm」: Failed to compile.

Also, navigating to localhost:4200 shows a blank page with Cannot GET /

System Details

u@x1 ~/D/g/s/p/w0182> go version
go version go1.13rc2 linux/amd64
u@x1 ~/D/g/s/p/w0182> go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/u/.cache/go-build"
GOENV="/home/u/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/u/goget:/home/u/Desktop/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/u/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/u/go1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build963844683=/tmp/go-build -gno-record-gcc-switches"
bug

Most helpful comment

Thanks for the quick response time! The "hello world" app works now for v0.18.3 of Wails.

All 3 comments

Hi @mewmew - sorry about that. Looks like it got through our checks :( I've done a hotfix so you should be able to wails update to v0.18.3 and this should work for you now. Please let us know how you get on! 👍

Thanks for the quick response time! The "hello world" app works now for v0.18.3 of Wails.

No worries! Thanks for letting us know about it!

On Wed, 9 Oct 2019, 20:35 Robin Eklind, notifications@github.com wrote:

Thanks for the quick response time! The "hello world" app works now for
v0.18.3 of Wails.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/wailsapp/wails/issues/253?email_source=notifications&email_token=AAO2SYBJJVGBY46KN4LDJVDQNWQWPA5CNFSM4I6X6YX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAXI6NI#issuecomment-539922229,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAO2SYDC4DCKFGKWWKOEYSLQNWQWPANCNFSM4I6X6YXQ
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leaanthony picture leaanthony  ·  3Comments

maxiride picture maxiride  ·  6Comments

leaanthony picture leaanthony  ·  6Comments

billacw picture billacw  ·  3Comments

yosefbenshimon picture yosefbenshimon  ·  5Comments