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

[Build Error] no variant or associated item named TrayFixedCenter found for enum Position in the current scope #753

Open
lichjian opened this issue Apr 1, 2023 · 4 comments

Comments

@lichjian
Copy link

lichjian commented Apr 1, 2023

Error message

yarn run v1.22.19
$ tauri build
Running beforeBuildCommand npm run build:fe
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1680362465117-0.45126643740307415/node but npm is using /home/lichjian/.nvm/versions/node/v14.18.0/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.

[email protected] build:fe /home/lichjian/GitProject/ChatGPT
tsc && vite build

vite v4.2.1 building for production...
✓ 4878 modules transformed.
dist/index.html 1.04 kB
dist/assets/index-a8c0dc73.css 3.85 kB │ gzip: 1.38 kB
dist/assets/md-7aa21ad3.css 22.84 kB │ gzip: 4.55 kB
dist/assets/antico-d250fde2.js 9.00 kB │ gzip: 3.27 kB
dist/assets/editor-97423dc6.js 16.04 kB │ gzip: 5.38 kB
dist/assets/rrr-de76ac38.js 18.51 kB │ gzip: 6.97 kB
dist/assets/utils-bb5fb6d3.js 73.12 kB │ gzip: 27.03 kB
dist/assets/index-3e9844e3.js 91.29 kB │ gzip: 26.16 kB
dist/assets/rm-4f962399.js 111.33 kB │ gzip: 34.34 kB
dist/assets/md-654bec03.js 230.33 kB │ gzip: 62.56 kB
dist/assets/rsh-78730008.js 881.71 kB │ gzip: 293.80 kB
dist/assets/ant-c24962bf.js 935.35 kB │ gzip: 293.26 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    ✓ built in 28.89s
    Compiling webkit2gtk-sys v0.18.0
    Compiling x11 v2.21.0
    Compiling html5ever v0.25.2
    Compiling javascriptcore-rs-sys v0.4.0
    Compiling typenum v1.16.0
    Compiling flate2 v1.0.25
    Compiling url v2.3.1
    Compiling brotli-decompressor v2.3.4
    Compiling treediff v3.0.2
    Compiling semver v1.0.16
    Compiling generic-array v0.14.6
    Compiling mio v0.8.6
    Compiling gdkx11-sys v0.15.1
    Compiling num_cpus v1.15.0
    Compiling x11-dl v2.21.0
    Compiling tokio-macros v1.8.2
    Compiling dtoa v0.4.8
    Compiling same-file v1.0.6
    Compiling utf-8 v0.7.6
    Compiling openssl v0.10.45
    Compiling foreign-types-shared v0.1.1
    Compiling fastrand v1.9.0
    Compiling foreign-types v0.3.2
    Compiling tendril v0.4.3
    Compiling dtoa-short v0.3.3
    Compiling walkdir v2.3.2
    Compiling brotli v3.3.4
    Compiling tokio v1.25.0
    Compiling json-patch v0.2.7
    Compiling kuchiki v0.8.1
    Compiling string_cache v0.8.4
    Compiling infer v0.7.0
    Compiling openssl-sys v0.9.80
    Compiling soup2-sys v0.2.0
    Compiling phf v0.10.1
    Compiling serde_with v1.14.0
    Compiling aho-corasick v0.7.20
    Compiling cssparser v0.27.2
    Compiling markup5ever v0.10.1
    Compiling crc32fast v1.3.2
    Compiling uuid v1.3.0
    Compiling rand_core v0.6.4
    Compiling openssl-macros v0.1.0
    Compiling itoa v0.4.8
    Compiling native-tls v0.2.11
    Compiling nodrop v0.1.14
    Compiling ppv-lite86 v0.2.17
    Compiling adler v1.0.2
    Compiling glob v0.3.1
    Compiling matches v0.1.10
    Compiling stable_deref_trait v1.2.0
    Compiling alloc-no-stdlib v2.0.4
    Compiling regex-syntax v0.6.28
    Compiling rand_chacha v0.3.1
    Compiling alloc-stdlib v0.2.2
    Compiling tauri-utils v1.2.1
    Compiling servo_arc v0.1.1
    Compiling regex v1.7.1
    Compiling miniz_oxide v0.6.2
    Compiling png v0.17.7
    Compiling crossbeam-channel v0.5.6
    Compiling fxhash v0.2.1
    Compiling selectors v0.22.0
    Compiling ahash v0.7.6
    Compiling instant v0.1.12
    Compiling libloading v0.7.4
    Compiling proc-macro2 v1.0.51
    Compiling openssl-probe v0.1.5
    Compiling unicode-ident v1.0.6
    Compiling thin-slice v0.1.1
    Compiling uuid v0.8.2
    Compiling cfb v0.6.1
    Compiling libappindicator-sys v0.7.3
    Compiling rand v0.8.5
    Compiling soup2 v0.2.1
    Compiling javascriptcore-rs v0.16.0
    Compiling block-buffer v0.10.3
    Compiling crypto-common v0.1.6
    Compiling tao v0.15.8
    Compiling dirs-sys-next v0.1.2
    Compiling quote v1.0.23
    Compiling io-lifetimes v1.0.5
    Compiling dirs-next v2.0.0
    Compiling digest v0.10.6
    Compiling webkit2gtk v0.18.2
    Compiling hashbrown v0.12.3
    Compiling libappindicator v0.7.1
    Compiling tracing-core v0.1.30
    Compiling tracing-attributes v0.1.23
    Compiling tauri-runtime v0.12.1
    Compiling rustix v0.36.8
    Compiling heck v0.4.1
    Compiling cpufeatures v0.2.5
    Compiling wry v0.23.4
    Compiling sha2 v0.10.6
    Compiling tracing v0.1.37
    Compiling ico v0.2.0
    Compiling serde_urlencoded v0.7.1
    Compiling bstr v1.3.0
    Compiling serde_repr v0.1.10
    Compiling http-range v0.1.5
    Compiling base64 v0.13.1
    Compiling rfd v0.10.0
    Compiling tauri-runtime-wry v0.12.2
    Compiling linux-raw-sys v0.1.4
    Compiling tauri-codegen v1.2.1
    Compiling globset v0.4.10
    Compiling anyhow v1.0.69
    Compiling tauri v1.2.4
    Compiling thread_local v1.1.7
    Compiling filetime v0.2.20
    Compiling encoding_rs v0.8.32
    Compiling xattr v0.2.3
    Compiling serialize-to-javascript-impl v0.1.1
    Compiling time-core v0.1.0
    Compiling parking v2.0.0
    Compiling pathdiff v0.2.1
    Compiling waker-fn v1.1.0
    Compiling event-listener v2.5.3
    Compiling futures-lite v1.12.0
    Compiling open v3.2.0
    Compiling time v0.3.20
    Compiling serialize-to-javascript v0.1.1
    Compiling tar v0.4.38
    Compiling ignore v0.4.18
    Compiling tauri-macros v1.2.1
    Compiling tempfile v3.4.0
    Compiling attohttpc v0.22.0
    Compiling zip v0.6.4
    Compiling os_info v3.6.0
    Compiling indexmap v1.9.2
    Compiling dirs-sys v0.3.7
    Compiling polling v2.5.2
    Compiling enumflags2_derive v0.7.4
    Compiling minisign-verify v0.2.1
    Compiling httparse v1.8.0
    Compiling state v0.5.3
    Compiling enumflags2 v0.7.5
    Compiling dirs v4.0.0
    Compiling async-lock v2.6.0
    Compiling tokio-util v0.7.7
    Compiling concurrent-queue v2.1.0
    Compiling zvariant_derive v3.11.0
    Compiling async-io v1.12.0
    Compiling async-trait v0.1.64
    Compiling try-lock v0.2.4
    Compiling static_assertions v1.1.0
    Compiling want v0.3.0
    Compiling h2 v0.3.15
    Compiling zvariant v3.11.0
    Compiling http-body v0.4.5
    Compiling tao v0.16.0
    Compiling cargo_toml v0.13.3
    Compiling atty v0.2.14
    Compiling dlv-list v0.3.0
    Compiling async-task v4.3.0
    Compiling tower-service v0.3.2
    Compiling httpdate v1.0.2
    Compiling sha1 v0.10.5
    Compiling hyper v0.14.24
    Compiling async-executor v1.5.0
    Compiling ordered-multimap v0.4.3
    Compiling colored v1.9.3
    Compiling zbus_names v2.5.0
    Compiling tauri-build v1.2.1
    Compiling async-broadcast v0.5.1
    Compiling tokio-native-tls v0.3.1
    Compiling zbus_macros v3.10.0
    Compiling nix v0.25.1
    Compiling ordered-stream v0.2.0
    Compiling async-recursion v1.0.2
    Compiling derivative v2.2.0
    Compiling wry v0.24.1
    Compiling dark-light v1.0.0
    Compiling utf8-width v0.1.6
    Compiling hex v0.4.3
    Compiling byte-unit v4.0.18
    Compiling chatgpt v0.0.0 (/home/lichjian/GitProject/ChatGPT/src-tauri)
    Compiling hyper-tls v0.5.0
    Compiling fern v0.6.1
    Compiling zbus v3.10.0
    Compiling rust-ini v0.18.0
    Compiling auto-launch v0.4.0
    Compiling csv-core v0.1.10
    Compiling bincode v1.3.3
    Compiling ipnet v2.7.1
    Compiling mime v0.3.16
    Compiling dconf_rs v0.3.0
    Compiling detect-desktop-environment v0.2.0
    Compiling base64 v0.21.0
    Compiling tauri-plugin-window-state v0.1.0 (https://github.com/lencx/tauri-plugins-workspace?branch=dev#bf1106a0)
    Compiling reqwest v0.11.14
    Compiling csv v1.2.0
    Compiling tauri-plugin-autostart v0.1.0 (https://github.com/lencx/tauri-plugins-workspace?branch=dev#bf1106a0)
    Compiling tauri-plugin-log v0.1.0 (https://github.com/lencx/tauri-plugins-workspace?branch=dev#bf1106a0)
    Compiling tauri-plugin-positioner v0.2.7 (https://github.com/lencx/tauri-plugins-workspace#bf1106a0)
    error[E0599]: no variant or associated item named TrayFixedCenter found for enum Position in the current scope
    --> src-tauri/src/app/menu.rs:467:40
    |
    467 | tray_win.move_window(Position::TrayFixedCenter).unwrap();
    | ^^^^^^^^^^^^^^^
    | |
    | variant or associated item not found in Position
    | help: there is a variant with a similar name: TrayCenter

For more information about this error, try rustc --explain E0599.
error: could not compile chatgpt due to previous error
Error failed to build app: failed to build app
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

OS

ubuntu18.04

Environment

No response

@lichjian lichjian changed the title [Build Error]ubuntu18 error[E0599]: no variant or associated item named TrayFixedCenter found for enum Position in the current scope [Build Error] no variant or associated item named TrayFixedCenter found for enum Position in the current scope Apr 1, 2023
@dogedefi
Copy link

dogedefi commented Apr 2, 2023

I got the same questions...

@dogedefi
Copy link

dogedefi commented Apr 2, 2023

Seems that can not find TrayFixedCenter from Position crate, @lichjian Maybe you can disable the code snippet to run success...

@dogedefi
Copy link

dogedefi commented Apr 2, 2023

See #757

@lichjian
Copy link
Author

lichjian commented Apr 2, 2023

@dogedefi yes ,after I comment, I can successfully compile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants