wailsapp / wails

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

default preact-ts template throws error and doesn't build #1780

Closed Debdut closed 2 years ago

Debdut commented 2 years ago

Description

Throws error on wails dev

$ wails dev
Wails CLI v2.0.0-beta.44.2

Executing: go mod tidy -compat=1.17
Executing: wails generate module
Building frontend for development...
  - Installing frontend dependencies: Done.
  - Compiling frontend:     
    > frontend@0.0.0 build
    > tsc && vite build

    src/app.tsx(18,13): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(19,17): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(20,17): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(20,65): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(21,17): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(22,21): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(23,21): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(23,66): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(24,17): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    src/app.tsx(25,13): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.

ERROR: exit status 2

To Reproduce

wails init -n app -t preact-ts
wails dev

Expected behaviour

No error

Screenshots

Screen Shot 2022-08-23 at 9 22 29 AM

Attempted Fixes

No response

System Details

Wails CLI v2.0.0-beta.44.2

Scanning system - Please wait (this may take a long time)...Done.

System
------
OS:     MacOS
Version:    12.5
ID:     21G72
Go Version: go1.18.3
Platform:   darwin
Architecture:   amd64

Wails
------
Version:    v2.0.0-beta.44.2

Dependency          Package Name    Status      Version
----------          ------------    ------      -------
xcode command line tools    N/A         Installed   2395
npm                 N/A         Installed   8.5.5
*upx                N/A         Installed   upx 3.96
*nsis               N/A         Available   

* - Optional Dependency

Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details: 
  - nsis : Available at https://nsis.sourceforge.io/Download

Additional context

No response

leaanthony commented 2 years ago

Master now has the fixes for this. Please test using this guide. If it doesn't work as expected, please reopen 👍

Debdut commented 2 years ago

Thanks will check!

Debdut commented 2 years ago

Hey, in the master build I don't see an preact-ts template through

Please select a template (* means unsupported on current platform):
  1: Angular - Angular 8 template (Requires node 10.8+)
  2: React JS - Create React App v4 template
  3: Svelte - A basic Svelte template
  4: Vanilla - A Vanilla HTML/JS template
  5: Vue3 Full - Vue 3, Vuex, Vue-router, and Webpack4
  6: Vue3 JS - A template based on Vue 3, Vue-router, Vuex, and Webpack5
  7: Vue2/Webpack Basic - A basic Vue2/WebPack4 template
  8: Vuetify1.5/Webpack Basic - A basic Vuetify1.5/Webpack4 template
  9: Vuetify2/Webpack Basic - A basic Vuetify2/Webpack4 template
Please choose an option [1]: 

Plus the initial init command in the docs doesn't work

$ wails init -n codeui -t preact-ts

Error: flag provided but not defined: -n
leaanthony commented 2 years ago

That screenshot is using wails v1

Debdut commented 2 years ago

really sorry man to keep bothering you, used wrong command to install, how should I install the master?

tried these, but still getting same errors

go install github.com/wailsapp/wails/v2/cmd/wails@master
go install github.com/wailsapp/wails/v2/cmd/wails@e6c9b13
leaanthony commented 2 years ago

https://wails.io/docs/gettingstarted/installation 🙏

Debdut commented 2 years ago

Thanks,

Lol I was following that only to install wails, and this issue was created after doing the wails installation via this command

go install github.com/wailsapp/wails/v2/cmd/wails@latest

I did that again but the preact problem still remains, but my fix somehow solved it