[TIMOB-27204] CLI: apiversion validation always fails for native modules installed via npm
GitHub Issue | n/a |
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-07-05T14:00:54.000+0000 |
Affected Version/s | Release 8.1.0, Release 8.2.0 |
Fix Version/s | Release 8.1.0 |
Components | Android, CLI, iOS |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2019-07-02T14:22:58.000+0000 |
Updated | 2019-07-05T14:00:54.000+0000 |
Description
Description
When installing a module from npm and building, the apiversion fails even if the apiversion is correct. This is because the apiversion passed in from the SDK is a string, whereas the version from the version we get from the module is a number. We should parseInt both of these before using them.
Steps to reproduce
1. In the root of your titanium project alongside tiapp.xml
, run npm init -y
and then npm i @titanium/imagefactory
2. Add <module>ti.imagefactory</module>
to your modules section in the tiapp
3. Build for Android or iOS (iOS will require TIMOB-27203 to be fixed first)
Actual
Build errors with \[ERROR\] Found incompatible Titanium Modules:
Expected
No error as everything is valid
Comments
JSON Source
This is a bug in the implementation of the linked ticket that makes it unusable so it should go into 8.1.0 imo
node-appc PR: https://github.com/appcelerator/node-appc/pull/171
master: https://github.com/appcelerator/titanium_mobile/pull/11025 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/11026
FR Passed.
*Closing ticket* Fix verified in SDK Version
8.2.0.v20190704101620
and8.1.0.v20190704101545
. Test and other information can be found at: master: https://github.com/appcelerator/titanium_mobile/pull/11025 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/11026