GitHub user GitToTheHub edited a discussion: Add cordova-android locally for 
development

Hi,

I wanted to add cordova-android locally, but it do not work. I added my 
cordova-android fork with `cordova platform add --link 
/path/to/cordova-android-fork` but get the following error:

```bash
Error: Command failed with exit code 127: npm install 
/Users/manuelbeck/Projekte/app_entwicklung/github/cordova-android-fork 
--save-dev
npm error code 127
npm error path 
/Users/manuelbeck/Projekte/app_entwicklung/github/cordova-android-fork
npm error command failed
npm error command sh -c cordova-js build > 
templates/project/assets/www/cordova.js
npm error sh: cordova-js: command not found
npm error A complete log of this run can be found in: 
/Users/manuelbeck/.npm/_logs/2025-07-06T16_27_09_436Z-debug-0.log
    at makeError 
(/Users/manuelbeck/.nvm/versions/node/v22.14.0/lib/node_modules/cordova/node_modules/execa/lib/error.js:60:11)
    at handlePromise 
(/Users/manuelbeck/.nvm/versions/node/v22.14.0/lib/node_modules/cordova/node_modules/execa/index.js:118:26)
    at process.processTicksAndRejections 
(node:internal/process/task_queues:105:5)
    at async module.exports 
(/Users/manuelbeck/.nvm/versions/node/v22.14.0/lib/node_modules/cordova/node_modules/cordova-fetch/index.js:73:9)
 {
  shortMessage: 'Command failed with exit code 127: npm install 
/Users/manuelbeck/Projekte/app_entwicklung/github/cordova-android-fork 
--save-dev',
  command: 'npm install 
/Users/manuelbeck/Projekte/app_entwicklung/github/cordova-android-fork 
--save-dev',
  escapedCommand: 'npm install 
"/Users/manuelbeck/Projekte/app_entwicklung/github/cordova-android-fork" 
--save-dev',
  exitCode: 127,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'npm error code 127\n' +
    'npm error path 
/Users/manuelbeck/Projekte/app_entwicklung/github/cordova-android-fork\n' +
    'npm error command failed\n' +
    'npm error command sh -c cordova-js build > 
templates/project/assets/www/cordova.js\n' +
    'npm error sh: cordova-js: command not found\n' +
    'npm error A complete log of this run can be found in: 
/Users/manuelbeck/.npm/_logs/2025-07-06T16_27_09_436Z-debug-0.log',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
```

The root cause sems to be `npm error sh: cordova-js: command not found`. The 
cordova-cli is up-to-date. When I add the fork with `cordova platform add 
https://github.com/GitToTheHub/cordova-android`it works.

Regards,

Manuel

GitHub link: https://github.com/apache/cordova/discussions/552

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscr...@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to