Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27204] CLI: apiversion validation always fails for native modules installed via npm

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-07-05T14:00:54.000+0000
Affected Version/sRelease 8.1.0, Release 8.2.0
Fix Version/sRelease 8.1.0
ComponentsAndroid, CLI, iOS
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2019-07-02T14:22:58.000+0000
Updated2019-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

  1. Ewan Harris 2019-07-02

    This is a bug in the implementation of the linked ticket that makes it unusable so it should go into 8.1.0 imo
  2. Ewan Harris 2019-07-02

    node-appc PR: https://github.com/appcelerator/node-appc/pull/171
  3. Ewan Harris 2019-07-03

    master: https://github.com/appcelerator/titanium_mobile/pull/11025 8_1_X: https://github.com/appcelerator/titanium_mobile/pull/11026
  4. Samir Mohammed 2019-07-04

    FR Passed.
  5. Samir Mohammed 2019-07-05

    *Closing ticket* Fix verified in SDK Version 8.2.0.v20190704101620 and 8.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

JSON Source