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

[Bug]: #7573

Open
1 of 3 tasks
IsaacPere opened this issue Jul 21, 2024 · 6 comments
Open
1 of 3 tasks

[Bug]: #7573

IsaacPere opened this issue Jul 21, 2024 · 6 comments
Labels
needs reproduction needs reproducible example to illustrate the issue

Comments

@IsaacPere
Copy link

Capacitor Version

bun run android
not function defined eacess.....

Other API Details

bunjs --version latest

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

I am having an issues with capacitor cli that aid in running android platform, can you consider to rewrite the entire cli android run.js file and then refactor the initialization of gradle and it running.

Expected Behavior

running smoothly and brazing fast in bun and node

Project Reproduction

capactor/cli/android/dist/run.js

Additional Information

No response

@jcesarmobile jcesarmobile added the needs reproduction needs reproducible example to illustrate the issue label Jul 26, 2024
Copy link

ionitron-bot bot commented Jul 26, 2024

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙

@ionitron-bot ionitron-bot bot removed the triage label Jul 26, 2024
@Ionitron Ionitron added needs reply needs reply from the user and removed needs reply needs reply from the user labels Jul 26, 2024
@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Jul 26, 2024
@IsaacPere
Copy link
Author

The best example is to create a JavaScript project using vite then install capacitor dependencies include android dependency then build it and run it using bun you will found that the cli of android file in particular run.js file will bring an error of unidentified and used EACESS.
And it seems that Android dependencies and the whole process is always dramatic and nightmare.
Once again use bun runtime enivormment for the issue diagnostics

@Ionitron Ionitron removed the needs reply needs reply from the user label Jul 28, 2024
@jcesarmobile
Copy link
Member

can you provide the sample app?

@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Jul 29, 2024
@IsaacPere
Copy link
Author

I have created a new repo named BunJSCapactiorJS
please use bunjs runtime for diagnostics and application development

@Ionitron Ionitron removed the needs reply needs reply from the user label Jul 29, 2024
@jcesarmobile
Copy link
Member

You didn't link the app, is it this one https://github.com/IsaacPere/BunJSCapactiorJS ?

I've tested it and it's working fine on my computer (macbook with macOS Sonoma 14.5)

I ran:

git clone https://github.com/IsaacPere/BunJSCapactiorJS
cd BunJSCapactiorJS
bun install
bun run build   
bun cap sync 
bun cap run android

I had bun 1.1.3 installed, also updated to latest (1.1.21) and also worked fine.

because you mean bun, right? in the description you mentioned bunjs, which is a 4 year old Chinese package.

You also mention bun run android, the correct command would be bun cap run android, with bun run android I get

Script not found "android"
So that's not your problem and it's probably just a typo.

@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Jul 31, 2024
@IsaacPere
Copy link
Author

✔ Copying web assets from dist to android/app/src/main/assets/public in 14.42ms
✔ Creating capacitor.config.json in android/app/src/main/assets in 2.66ms
[info] Inlining sourcemaps
✔ copy android in 37.92ms
✔ Updating Android plugins in 1.62ms
✔ update android in 54.27ms
✖ Running Gradle build - failed!
[error] TypeError: Executable not found in $PATH: "./gradlew"
at spawn (native)
at spawn (node:child_process:721:8)
at (node:child_process:2:21)
at spawn
(/home/isaacpere/BunJSCapactiorJS/node_modules/cross-spawn/index.js:12:24)
at spawn
(/home/isaacpere/BunJSCapactiorJS/node_modules/@ionic/utils-subprocess/dist/index.js:170:12)
at run
(/home/isaacpere/BunJSCapactiorJS/node_modules/@ionic/utils-subprocess/dist/index.js:105:24)
at
(/home/isaacpere/BunJSCapactiorJS/node_modules/@ionic/utils-subprocess/dist/index.js:68:30)
at output
(/home/isaacpere/BunJSCapactiorJS/node_modules/@ionic/utils-subprocess/dist/index.js:66:20)
at
(/home/isaacpere/BunJSCapactiorJS/node_modules/@capacitor/cli/dist/util/subprocess.js:8:24)
at runCommand
(/home/isaacpere/BunJSCapactiorJS/node_modules/@capacitor/cli/dist/util/subprocess.js:5:27)
error: "cap" exited with code 1

I gotten the messages but I forgot to tell you that I am using kali linux
I have tried everything and seems that you need to reconfigure the capacitor cli node modules and also the android node modules in javascript, what should we do ?

@Ionitron Ionitron removed the needs reply needs reply from the user label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction needs reproducible example to illustrate the issue
Projects
None yet
Development

No branches or pull requests

3 participants