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

"npm run build" doesn't finish building app #20

Closed
hadess opened this issue Dec 3, 2022 · 3 comments
Closed

"npm run build" doesn't finish building app #20

hadess opened this issue Dec 3, 2022 · 3 comments

Comments

@hadess
Copy link

hadess commented Dec 3, 2022

Trying to package this app as a Flatpak, I ran into problems getting the application to finish building. The dist/ directory doesn't have any binaries as can be seen by the debug find dist/ being run after npm run build.

The (unfinished) Flatpak manifest is at:
https://github.com/hadess/flathub/blob/pocket-sync/com.github.neil_morrison44.pocket-sync.yaml

I tested with both node16 and node18 runtimes.

Running: npm ci --offline --cache=$FLATPAK_BUILDER_BUILDDIR/flatpak-node/npm-cache

added 399 packages, and audited 400 packages in 6s

107 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Running: npm run build

> [email protected] build
> tsc && vite build

vite v3.2.4 building for production...
transforming (1355) node_modules/lodash/_Uint8Array.jsUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification
✓ 1844 modules transformed.
dist/assets/AnalogueOS-Regular.fd6d491a.woff2   9.25 KiB
dist/assets/AnalogueOS-Regular.7911d8ee.woff    14.88 KiB
dist/index.html                                 0.44 KiB
dist/assets/index.96367cfe.css                  18.93 KiB / gzip: 4.17 KiB
dist/assets/index.cf1f3b26.js                   1271.25 KiB / gzip: 351.58 KiB

(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
Running: find dist/
dist/
dist/tauri.svg
dist/vite.svg
dist/index.html
dist/assets
dist/assets/AnalogueOS-Regular.fd6d491a.woff2
dist/assets/AnalogueOS-Regular.7911d8ee.woff
dist/assets/index.96367cfe.css
dist/assets/index.cf1f3b26.js
@neil-morrison44
Copy link
Owner

I think you need to npm run tauri build to get it to build both the FE & the BE - I've not changed much buildwise from the initial tauri setup so the tauri docs should cover everything, hopefully

@hadess
Copy link
Author

hadess commented Dec 3, 2022

I managed to get further, and now I'm running into missing native deps for the Rust parts of the build. I'll reopen if I run into anything related to pocket-sync itself. Thanks!

@hadess hadess closed this as completed Dec 3, 2022
@neil-morrison44
Copy link
Owner

This might be interesting: tauri-apps/tauri#3619

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