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

The frontend compilation failed #3561

Open
jxs1211 opened this issue Jun 22, 2024 · 2 comments
Open

The frontend compilation failed #3561

jxs1211 opened this issue Jun 22, 2024 · 2 comments
Labels
Bug Something isn't working

Comments

@jxs1211
Copy link

jxs1211 commented Jun 22, 2024

Description

When I'm building app on WSL ubuntu2004, I encounter the frontend compiling issue

To Reproduce

➜ tiny-rdm git:(main) wails dev
Wails CLI v2.9.1

Updating go.mod to use Wails 'v2.9.1'
Executing: go mod tidy
• Generating bindings: 2024/06/22 21:27:57 2024/06/22 21:27:57 preferences path: /root/.config/TinyRDM/preferences.yaml
KnownStructs: convutil.CmdConvert types.Connection types.ConnectionCluster types.ConnectionConfig types.ConnectionProxy types.ConnectionSSH types.ConnectionSSL types.ConnectionSentinel types.GetHashParam types.JSResp types.KeyDetailParam types.KeySummaryParam types.Preferences types.PreferencesBehavior types.PreferencesCli types.PreferencesDecoder types.PreferencesEditor types.PreferencesGeneral types.SetHashParam types.SetKeyParam types.SetListParam types.SetSetParam types.SetZSetParam
types.ConnectionSSL
KnownStructs: convutil.CmdConvert types.Connection types.ConnectionCluster types.ConnectionConfig types.ConnectionProxy types.ConnectionSSH types.ConnectionSSL types.ConnectionSentinel types.GetHashParam types.JSResp types.KeyDetailParam types.KeySummaryParam types.Preferences types.PreferencesBehavior types.PreferencesCli types.PreferencesDecoder types.PreferencesEditor types.PreferencesGeneral types.SetHashParam types.SetKeyParam types.SetListParam types.SetSetParam types.SetZSetParam
...
types.PreferencesCli

Done.
• Installing frontend dependencies: Done.
• Compiling frontend:
> [email protected] build
> vite build

vite v5.3.1 building for production...
transforming...
✓ 412 modules transformed.

x Build failed in 7.06s
error during build:
[vite]: Rollup failed to resolve import "copy-text-to-clipboard" from "/home/going/workspace/myspace/golang/tiny-rdm/frontend/src/components/content_value/ContentMonitor.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:65810:17)
    at onRollupWarning (file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:65845:5)
    at onwarn (file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:65505:7)
    at file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/rollup/dist/es/shared/node-entry.js:18303:13
    at Object.logger [as onLog] (file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/rollup/dist/es/shared/node-entry.js:19950:9)
    at ModuleLoader.handleInvalidResolvedId (file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/rollup/dist/es/shared/node-entry.js:18893:26)
    at file:///home/going/workspace/myspace/golang/tiny-rdm/frontend/node_modules/rollup/dist/es/shared/node-entry.js:18851:26

ERROR exit status 1
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Expected behaviour

The frontend can be compiled and dev run successfully.

Screenshots

No response

Attempted Fixes

No response

System Details

➜  tiny-rdm git:(main) ✗ wails doctor

                                
          Wails Doctor          
                                

                                                                                             
# Wails
Version         | v2.9.1
Package Manager | apt   

# System
┌──────────────────────────────────────────────────────────┐
| OS           | Ubuntu                                    |
| Version      | 20.04                                     |
| ID           | ubuntu                                    |
| Go Version   | go1.22.0                                  |
| Platform     | linux                                     |
| Architecture | amd64                                     |
| CPU          | Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz |
| GPU          | Unknown                                   |
| Memory       | 32GB                                      |
└──────────────────────────────────────────────────────────┘

# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name          | Status    | Version                 |
| *docker    | docker.io             | Installed | 25.0.3                  |
| gcc        | build-essential       | Installed | 12.8ubuntu1.1           |
| libgtk-3   | libgtk-3-dev          | Installed | 3.24.20-0ubuntu1.1      |
| libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.38.6-0ubuntu0.20.04.1 |
| npm        | npm                   | Installed | 10.2.4                  |
| *nsis      | nsis                  | Installed | v3.05-2                 |
| pkg-config | pkg-config            | Installed | 0.29.1                  |
└──────────────────────── * - Optional Dependency ─────────────────────────┘

# Diagnosis
 SUCCESS  Your system is ready for Wails development!

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony


### Additional context
The ubuntu environment is WSL with:

cat /etc/issue
Ubuntu 20.04.6 LTS \n \l
node -v
v20.11.0
npm -v
10.2.4

@jxs1211 jxs1211 added the Bug Something isn't working label Jun 22, 2024
@leaanthony
Copy link
Member

Hi there 👋 We don't officially support WSL but I do know a good number of people use it successfully. I'd recommend asking on discord where I know some of those people hang out 👍

@jxs1211
Copy link
Author

jxs1211 commented Jun 23, 2024

Thanks for your advice, I will checkout out there.

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