Skip to content

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

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

Open
LPTP1Dev opened this issue Jan 6, 2021 · 6 comments
Open

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

LPTP1Dev opened this issue Jan 6, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@LPTP1Dev
Copy link

LPTP1Dev commented Jan 6, 2021

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
Copy link

@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
Copy link
Author

LPTP1Dev commented Jan 7, 2021

@dydgns2017

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

  • run: npm uninstall -g androidjs-builder
  • run: npm i androidjs
  • run: npm i -g androidjs-builder
  • run: androidjs build --force

(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
Copy link

@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
Copy link
Member

Chhekur commented Jan 17, 2021

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

@Chhekur Chhekur added the bug Something isn't working label Jan 17, 2021
@dydgns2017
Copy link

dydgns2017 commented Jan 19, 2021

@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
Copy link

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

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

4 participants