-
Notifications
You must be signed in to change notification settings - Fork 41
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
Bad error message if a module is not found #219
Comments
I believe this was fixed in cordova-cli in apache/cordova-cli#640 |
Hi, yes it looks that it is fixed by this pr. So I have to what for a new release of the cli. Do you know, when this will be released? Thanks and regards. |
Can't make any promises about release dates or timelines, since Apache Cordova is maintained by volunteers. It will depend on when someone has time and capacity to start the release process. Lately the focus has been on other things like the next major version for the iOS platform. |
Thank you, I understand and it is clear to me. Now I know this issue and know, there will be a fix in the future :) Regards, Manuel |
Bug Report
I'm new in plugin development and tried to write a hook. I used as an example
https://github.com/AyogoHealth/cordova-plugin-app-scope/blob/main/src/prepare_hook.js
When I was executing the line:
const et = require('elementtree');
I got an error on the console:I was wondering about this error message and looked in
cordova:32:22
. The line which was throwing the error was:process.exitCode = err.code || 1;
I understood, the console was complaining that
code
was a string instead of a number. When I didconsole.log(err)
in the script, I saw the error message:Error: Cannot find module 'elementtree' Require stack: - /Users/manuelbeck/Projekte/GitHub/cordova-plugin-local-notifications/src/prepare_hook.js - /Users/manuelbeck/.nvm/versions/node/v22.9.0/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js - /Users/manuelbeck/.nvm/versions/node/v22.9.0/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js - /Users/manuelbeck/.nvm/versions/node/v22.9.0/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/plugman.js - /Users/manuelbeck/.nvm/versions/node/v22.9.0/lib/node_modules/cordova/node_modules/cordova-lib/cordova-lib.js ...
This should be fixed.
Command or Code
cordova prepare android
Environment, Platform, Device
macOS 15.2
MacBook Pro 2019 13"
ZSH
Version information
Cordova CLI: 12.0.0 ([email protected])
cordova-Android: 13.0.0
The text was updated successfully, but these errors were encountered: