wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.18k stars 1.21k forks source link

`wails dev` fails when running on `vue-ts` template with latest nodejs version #3233

Open hamza-m-masood opened 9 months ago

hamza-m-masood commented 9 months ago

Description

I received this error when executing wails dev on the vue-ts template:

Wails CLI v2.7.1

Executing: go mod tidy
  • Generating bindings: Done.
  • Installing frontend dependencies: Done.
  • Compiling frontend:
    > frontend@0.0.0 build
    > vue-tsc --noEmit && vite build

    src/App.vue(5,3): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/components/HelloWorld.vue(22,7): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.

To Reproduce

node version: v20.11.0 wails version: v2.7.1 I ran this command: wails init -t vue-ts -n hamza then I entered the generated folder and ran this command: wails dev

Expected behaviour

I expect the wails dev command to function correctly without errors.

Screenshots

No response

Attempted Fixes

I attempted various version of nodejs and wails. I was not able to run vue-ts template successfully.

System Details

╰─$ wails doctor                                                                                                                                                                                                                                                                        1 ↵

          Wails Doctor

# Wails
Version | v2.7.1

# System
┌─────────────────────────┐
| OS           | MacOS    |
| Version      | 13.6.2   |
| ID           | 22G320   |
| Go Version   | go1.21.3 |
| Platform     | darwin   |
| Architecture | arm64    |
| CPU          | Unknown  |
| GPU          | Unknown  |
| Memory       | Unknown  |
└─────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────────────┐
| Dependency                | Package Name | Status    | Version         |
| Xcode command line tools  | N/A          | Installed | 2397            |
| Nodejs                    | N/A          | Installed | 20.11.0         |
| npm                       | N/A          | Installed | 10.2.4          |
| *Xcode                    | N/A          | Installed | 15.0.1 (15A507) |
| *upx                      | N/A          | Available |                 |
| *nsis                     | N/A          | Available |                 |
└─────────────────────── * - Optional Dependency ────────────────────────┘

# Diagnosis
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!

Additional context

No response

atterpac commented 9 months ago

I believe this is due to vue-tsc being an older version in the template try updating to a later version. Was able to reproduce issue on my machine and updating vue-tsc to ^1.8.27 fixed the build stage. Template might just need an update

hamza-m-masood commented 9 months ago

Thanks that fixed it!