copy android failed! Error: ENOENT: no such file or directory, stat

copy android failed! Error: ENOENT: no such file or directory, stat

door يزن العجلوني -
Aantal antwoorden: 2

i follow "setting up development environment for the moodle app" instructions.

 Specifically for android platform .

After following all the steps and reaching the running command "npx cap run android" step,

 I got these errors


× copy android - failed!

[error] Error: ENOENT: no such file or directory, stat

        'C:\Users\user\Desktop\moodleapp-main\cordova-plugin-moodleapp\www\index.js'


× update android - failed!

[error] Error: ENOENT: no such file or directory, stat

        'C:\Users\user\Desktop\moodleapp-main\cordova-plugin-moodleapp\www\index.js'

more information :

I am working on windows using android studio

"name": "moodlemobile",
"version": "4.4.0",
Gemiddelde van de beoordelingen:  -
Als antwoord op يزن العجلوني

Re: copy android failed! Error: ENOENT: no such file or directory, stat

door Noel De Martin -
Foto van Core developers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Peer reviewers Foto van Plugin developers

Hi there,

It seems like you're trying to use Capacitor to build the app, but we're using Cordova. Maybe you've found this npx cap run android command in Ionic's documentation, but make sure to follow the commands we have written in our documentation: npm run dev:android.

If you face any more issues, I'd recommend looking at the Troubleshooting page.

Gemiddelde van de beoordelingen:  -
Als antwoord op Noel De Martin

Re: copy android failed! Error: ENOENT: no such file or directory, stat

door يزن العجلوني -
thank you for replying "Noel De Martin"
i used this command "npm run dev:android"
and i got this
PS C:\Users\user\Downloads\moodleapp-main2> npm run dev:android

> moodlemobile@4.4.0 dev:android
> concurrently "npm run dev:android:app" "npm run dev:android:cordova"

[0]
[0] > moodlemobile@4.4.0 dev:android:app
[0] > ionic cordova run android --livereload --external --ssl
[0]
[1]
[1] > moodlemobile@4.4.0 dev:android:cordova
[1] > npm run dev --prefix cordova-plugin-moodleapp
[1]
[0] [INFO] Hardware device(s) found for android. Using --device.
[0] > npm.cmd run ionic:serve:before
[1]
[1] > cordova-plugin-moodleapp@0.0.0 dev
[1] > concurrently "npm run dev:ts" "npm run dev:cordova"
[1]
[0]
[0] > moodlemobile@4.4.0 ionic:serve:before
[0] > gulp
[0]
[1] [0]
[1] [0] > cordova-plugin-moodleapp@0.0.0 dev:ts
[1] [0] > scripts/build.js --watch
[1] [0]
[1] [0] 'scripts' is not recognized as an internal or external command,
[1] [0] operable program or batch file.
[1] [0] npm run dev:ts exited with code 1
[1] [1]
[1] [1] > cordova-plugin-moodleapp@0.0.0 dev:cordova
[1] [1] > chokidar www/index.js -c scripts/copy-javascript.js
[1] [1]
[1] [1] Watching "www/index.js" ..
[0] [09:10:17] Using gulpfile ~\Downloads\moodleapp-main2\gulpfile.js
[0] [09:10:17] Starting 'default'...
[0] [09:10:17] Starting 'lang'...
[0] [09:10:17] Starting 'env'...
[0] [09:10:17] Starting 'icons'...
[0] [09:10:18] Finished 'env' after 120 ms
[0] [09:10:18] Finished 'icons' after 121 ms
[0] [09:10:18] Finished 'lang' after 405 ms
[0] [09:10:18] Finished 'default' after 407 ms
[0] > npm.cmd run ionic:serve -- --host=0.0.0.0 --port=8100 --ssl --platform=android --project=app
[0] [npm] > moodlemobile@4.4.0 ionic:serve
[0] [npm] > cross-env-shell ./scripts/serve.sh --host=0.0.0.0 --port=8100 --ssl --platform=android --project=app
[0]
[0] [ERROR] npm has unexpectedly closed (exit code 0).
[0]
[0] The Ionic CLI will exit. Please check any output above for error details.
[0] npm run dev:android:app exited with code 1

i am looking at the Troubleshooting page and I couldn't find anything related.
Gemiddelde van de beoordelingen:  -