android-js / androidjs

Platform to build android app using node js
MIT License
464 stars 109 forks source link

Fix build command so it can run in github actions #161

Open LPTP1Dev opened 3 years ago

LPTP1Dev commented 3 years ago

Describe the bug Try to run build in github actions

To Reproduce Steps to reproduce the behavior:

  1. Set up installation and built in github actions

Expected behavior Builds the app

What happens Error cause of console not running as admin:

Run androidjs build --release= false Downloading: https://github.com/android-js/androidjs-sdk/archive/master.zip /opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:35 process.stdout.clearLine(); ^

TypeError: process.stdout.clearLine is not a function at LoadingBar.clear (/opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:35:24) at LoadingBar.next (/opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:23:14) at Timeout._onTimeout (/opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:42:18) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) Error: Process completed with exit code 1.

dydgns2017 commented 3 years ago

@LPTP1Dev

Have you edited the android js build file?

First, there are two solutions

one : use --force option when use build command

like thist

androidjs build --force

two :

i think u have to do reinstall android js builder

npm uninstall -g androidjs-builder
npm i -g androidjs-builder

and then use command like this

androidjs update
androidjs build --force
LPTP1Dev commented 3 years ago

@dydgns2017

No I just installed it on github actions, find the action flow below:

(Some things like the uninstall and the --force I added after your message)

I'm still getting this error on the buuld command:

Run androidjs build --force --release= false Downloading: https://github.com/android-js/androidjs-sdk/archive/master.zip /opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:35 process.stdout.clearLine(); ^

TypeError: process.stdout.clearLine is not a function at LoadingBar.clear (/opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:35:24) at LoadingBar.next (/opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:23:14) at Timeout._onTimeout (/opt/hostedtoolcache/node/12.20.0/x64/lib/node_modules/androidjs-builder/modules/Html/ProgressBar.js:42:18) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) Error: Process completed with exit code 1.

dydgns2017 commented 3 years ago

@LPTP1Dev

have u try this ?

https://github.com/android-js/androidjs#quick-start

i think u not made android project file

see it this is helpful to u

https://android-js.github.io/docs/

Chhekur commented 3 years ago

@LPTP1Dev you are facing this problem because process.stdout.clearLine is not the part of debug consoles

dydgns2017 commented 3 years ago

@LPTP1Dev

i think its reference link is helpful to u https://stackoverflow.com/a/58063715/11802642

so u should run into the window default console or fix to process.out function

occurred an error when i execute in the bash

but window default command console isnt

image image

EhsanFox commented 3 years ago

You are using the Git Bash i guess, just run cmd as administrator and you are done.