Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hamza-m-masood opened this issue Feb 4, 2024 · 2 comments
Labels
Bug Something isn't working

Comments

@hamza-m-masood
Copy link

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:
    > [email protected] 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

@hamza-m-masood hamza-m-masood added the Bug Something isn't working label Feb 4, 2024
@hamza-m-masood hamza-m-masood changed the title wails dev fails when running on vue-ts template with latest nodejs version wails dev fails when running on vue-ts template with latest nodejs version Feb 4, 2024
@atterpac
Copy link
Member

atterpac commented Feb 4, 2024

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
Copy link
Author

Thanks that fixed it!

rivy added a commit to rivy-t/my-app that referenced this issue Mar 19, 2024
# [why]

`wails` fails to build the frontend in the previous configuration.

This seems to be a combination or interaction failure. First, it seems that `wails`
doesn't execute the frontend build command (`pnpm exec vue-tsc --noEmit && pnpm exec
vite build`) correctly. When executed, the internal `&&` is ignored and the script line is
executed as a single command unit. This causes `vue-tsc` to attempt interpretation of all
subsequent words as arguments and files to compile. The command then fails with multiple
errors ("error TS6231: Could not resolve the path '&&' with the extensions: '.ts', '.tsx',
'.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'" for all the later words in the command ['&&',
'pnpm', 'exec', 'vite', and 'build']).

This occurs even if all related commands/packages ('pnpm', 'vue-tsc', 'wails', ...) are
updated to the most recent versions.

## possibly related conversations/issues

- [ERROR TS6231 - Could not resolve the path...](https://stackoverflow.com/questions/68970633/error-ts6231-could-not-resolve-the-path-with-the-extensions-ts-tsx)
- [wails ~ `wails dev` fails when running on vue-ts template](wailsapp/wails#3233)
- [wails ~ cannot build vue-ts based project](wailsapp/wails#1796)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants