-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Search first
- I searched and no similar issues were found
What Happened?
When attempting to build and test the app on a connected Android device using the command yarn run-android-release I run into the error below.
yarn run v1.22.22
$ yarn clean && yarn release-app && rm -rf ./public/static && rm -rf ./static/js/*.map && mv static ./public && npx cap sync android && npx cap run android
$ gulp clean
[11:51:57] Using gulpfile ~/src/logseq-og/gulpfile.js
[11:51:57] Starting 'clean'...
[11:51:58] Finished 'clean' after 232 ms
$ run-s gulp:build cljs:release-app
$ cross-env NODE_ENV=production gulp build
[11:51:58] Using gulpfile ~/src/logseq-og/gulpfile.js
[11:51:58] Starting 'build'...
[11:51:58] Starting 'clean'...
[11:51:58] Finished 'clean' after 9.65 ms
[11:51:58] Starting 'syncResourceFile'...
[11:51:59] Finished 'syncResourceFile' after 134 ms
[11:51:59] Starting 'syncAssetFiles'...
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 39 ms
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 9.78 ms
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 4.47 ms
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 70 ms
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 9.16 ms
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 17 ms
[11:51:59] Starting '<anonymous>'...
[11:51:59] Finished '<anonymous>' after 17 ms
[11:51:59] Finished 'syncAssetFiles' after 168 ms
[11:51:59] Starting 'buildCSS'...
[11:51:59] Starting '<anonymous>'...
[11:52:16] Finished '<anonymous>' after 17 s
[11:52:16] Starting '_optimizeCSSForRelease'...
[11:52:16] Finished '_optimizeCSSForRelease' after 718 ms
[11:52:16] Finished 'buildCSS' after 18 s
[11:52:16] Finished 'build' after 18 s
$ clojure -M:cljs release app --config-merge "{:compiler-options {:output-feature-set :es6}}"
[:app] Compiling ...
git describe --long --always --dirty
:shadow.hooks/git-revision-hook "30dc28eb4-dirty"
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
------ WARNING #1 - -----------------------------------------------------------
Resource: node_modules/codemirror/mode/forth/forth.js:26
String continuations are not recommended. See https://google.github.io/styleguide/jsguide.html#features-strings-no-line-continuations
--------------------------------------------------------------------------------
nil
------ WARNING #1 - -----------------------------------------------------------
File: /home/s3/src/logseq-og/src/main/frontend/components/file_sync.cljs:591:9
--------------------------------------------------------------------------------
588 | (rum/use-effect!
589 | (fn []
590 | (when-not loading?
591 | (async/go
---------------^----------------------------------------------------------------
unreachable code
--------------------------------------------------------------------------------
592 | (set-loading? true)
593 | (try
594 | (let [files (async/<! (file-sync-handler/<fetch-page-file-versions graph-uuid page-entity))]
595 | (set-version-files files)
--------------------------------------------------------------------------------
------ WARNING #2 - -----------------------------------------------------------
Resource: node_modules/fuse_DOT_js/dist/fuse.common.js:2
constant module$node_modules$fuse_DOT_js$dist$fuse_common assigned a value more than once.
Original definition at externs.shadow.js:48
--------------------------------------------------------------------------------
nil
[:app] Build completed. (1336 files, 1160 compiled, 0 warnings, 109.28s)
[error] Parsing capacitor.config.ts failed.
Error: ENOENT: no such file or directory, open 'static/package.json'
at Object.readFileSync (node:fs:440:20)
at Object.<anonymous> (/home/s3/src/logseq-og/capacitor.config.ts:7:42)
at Module._compile (node:internal/modules/cjs/loader:1706:14)
at require.extensions..ts (/home/s3/src/logseq-og/node_modules/@capacitor/cli/dist/util/node.js:35:72)
at Module.load (node:internal/modules/cjs/loader:1441:32)
at Function._load (node:internal/modules/cjs/loader:1263:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Module.require (node:internal/modules/cjs/loader:1463:12)
at require (node:internal/modules/helpers:147:16)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
In the package.json file, the run-android-release command includes a section && mv static ./public, re/moving the static directory before capacitor.config.ts can utilize the static/package.json file, resulting in the error.
Removing && mv static ./public makes it work, but that's a workaround.
Is there a reason this command is built that way? I haven't found an equivalent action in the master branch's package.json, and I'm wondering if I'm missing something/doing something wrong or is this something that needs a change (which I'm willing to spend time on)
Thank you for your time!
Reproduce the Bug
- Clone the repository.
- Run
yarn && yarn app-watch - Run
yarn run-android-releasein another terminal tab - See error
Expected Behavior
No response
Screenshots
No response
Desktop or Mobile Platform Information
Arch Linux
Additional Context
I believe I have followed the full instructions in the docs regarding setting up the development environment and Android development, though I may have missed something.
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)